HI Fernando, For what it¹s worth in applications where we have a diverse range of locales we found that it was best to create our own date converter.
The date converter then reads our properties file which contains an entry with a comma delimited list of date formats which the date converters tries in sequence and only if it fails does it throw an error. We¹ve now developed about 6 applications that our clients use in non-English countries and we¹re finding it works great. If you want the source code just email me off list. Z. > > > Any advice, please ? > Thanks. > > > -----Message d'origine----- > De : Celinio Fernandes [mailto:cel...@yahoo.com] > Envoyé : dimanche 15 novembre 2009 23:08 > À : Struts Users Mailing List > Objet : [Struts 2.1.8] datetimepicker and action: String or Date ?? > > Hi, > I have struts2-core-2.1.8.jar and xwork-core-2.1.6.jar in my classpath. > > I read that there are many problems of conversion using the datetimepicker > tag. > > I checked the vault page here : > http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x > -to-21x.html#TroubleshootingguidemigratingfromStruts2.0.xto2.1.x-Userdefinedco > nverter%2528subclassingStrutsTypeConverter%2529willnolongerbeneededwhenusingda > tetimepicker%253A > > > But what exactly is the type of the getter/setter in the action ?? > > For instance if I use this line in a JSP : > <sx:datetimepicker name="expirationDate" key=".dateexpiMois" > displayFormat="MM/yyyy" required="true"/> > > > What getters should i get in my action ? > > java.util.Date expirationDate; > //String expirationDate; > > public java.util.Date getExpirationDate() { > return expirationDate; > } > > public void setExpirationDate(java.util.Date expirationDate) { > this.expirationDate = expirationDate; > } > > ==> I get this error : > java.lang.NoSuchMethodException: > com.eni.dvtejb.clientStruts2.action.PaiementAction.setExpirationDate([Ljava.la > ng.String;) > > And if i use getter/setter of type String, it complains about some RFC format > that is not valid. > > So how exactly does it work ? Can someone provide a good example with the code > for the action and the code for the JSP with the datetimepicker tag ? > > Thanks. > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org >