Hi, On Tue, 2008-09-23 at 23:59 +0200, Luca Menegus wrote: [snip] > if anybody is interested I'll have some more tests tomorrow. I have also seen this issue but didn't find the time to have a look at it. So I'm definitely interested :)
> Looking forward to have a fix for this issue included in the next release. Sounds really good! Cheers, Martin On Tue, 2008-09-23 at 23:59 +0200, Luca Menegus wrote: > 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] -- Martin Grotzke http://www.javakaffee.de/blog/
signature.asc
Description: This is a digitally signed message part