Hi all,
don't know if this has been already reported but the new datefield component's not working for me. The problem seems to lie in the onParse methos of the org.apache.tapestry5.corelib.components.DateField class which reads:

JSONObject onParse()
   {
       String input = request.getParameter(INPUT_PARAMETER);
       JSONObject response = *new* JSONObject();
       *try*
       {
           Date date = format.parse(input);
           response.put(RESULT, date.toString());
       }
       *catch* (ParseException ex)
       {
           response.put(ERROR, ex.getMessage());
       }
       *return* response;
   }

It formats the response using date.toString() which returns a string which is not parsable by JS in my current setup. I got around it replacing "response.put(RESULT,date.toString());" with "response.put(RESULT, popupFormat.format(date));" (popupFormat is defined in the same class as *new* SimpleDateFormat(*"MM/dd/yyyy"*);). Don't know if this format is correctly parsed by all browser in every Locale, if anybody is interested I'll have some more tests tomorrow.
Looking forward to have a fix for this issue included in the next release.
Nice night,
Luca


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to