hoaivan / Writing-Planet

1 stars 0 forks source link

wrong use of attemptDate #7

Closed hoaivan closed 12 years ago

hoaivan commented 12 years ago
  1. sao lại phải pass attemptDate từ actionPhase sang renderPhase? actionResponse.setRenderParameter("attemptDate", "" + new Date());
  2. sao lại phải ép sang kiểu string để lại mất công parse lại?
  3. Dùng chung datetimeformatter đã có sẵn và đã khởi tạo trong init.jspf: => ko dùng thế này sau này sửa mất công SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssZ");
  4. Sao lại đưa attemptDate về client để thành hidden field => ko cần đưa về client side, tính ngay trên server!!!!
cuongmc commented 12 years ago

Đã sửa