Yes thats right... When i have the following signature for the setter method
setDataInicial(java.util.Date data){ } The method is called properly and my date is setted, but it changes dd/MM for MM/dd, so if my date is 01/12 (first of december) in my bean it turns to 12/01 (twelveth of january). If i change my method to setDataInicial(String data) {} The method is not called, that doesn't make any sense to me. On 6/14/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:
Make sure the inputName matches the name of the setter method, I assume you have a getAnuncio() in your action whose result has a setDataInicial() method right? musachy On 6/13/07, Diego Yasuhiko Kurisaki <[EMAIL PROTECTED]> wrote: > > I'm using saveFormat=rfc and java.util.Date as my object > > My dojo is. > > <div dojoType="dropdowndatepicker" id="Anuncio_anuncio_dataInicial" name=" > dojo.anuncio.dataInicial" inputName="anuncio.dataInicial" > displayFormat="dd/MM/yyyy" saveFormat="rfc" value="<s:property value=" > anuncio.fmtDataInicial"/>"> > > and my setter > > public void setDataInicial(Date dataInicial) { > this.dataInicial = dataInicial; > } > > I've tried to change my setter method to > > public void setDataInicial(Date dataInicial) { > SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); > try { > this.dataInicial = dateFormat.parse(dataInicial); > } catch (ParseException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > } > > But then my method was not even called... > > > On 6/13/07, Musachy Barroso <[EMAIL PROTECTED]> wrote: > > > > Try using a Date object for your field, and set saveFormat="rfc" for the > > widget. > > > > musachy > > > > On 6/13/07, Diego Yasuhiko Kurisaki <[EMAIL PROTECTED]> wrote: > > > > > > I'm manually using the DojoTookit Date Picker withe the following > > pattern > > > > > > dd/MM/yyy > > > > > > in my action i have a setter method like this. > > > > > > setDate(Date date){ > > > this.date = date > > > } > > > > > > But it seens that the struts 2 when sets the method changes from > > > dd/MM/yyyy > > > for MM/dd/yyyy does anyone know any solution? > > > > > > I've tried to make a set method that receives String and then parse > the > > > date > > > by myself. But the new setMethod was not called when the form is > > > submitted > > > . > > > > > > > > > On 6/13/07, Torsten Römer <[EMAIL PROTECTED]> wrote: > > > > > > > > Everytime my app starts, I see this in the log: > > > > > > > > 13.06.2007 23:50:27 org.apache.struts2.config.Settings getLocale > > > > WARNUNG: Settings: Could not parse struts.locale setting, > substituting > > > > default VM locale > > > > > > > > I put > > > > > > > > <constant name="struts.locale" value="en_GB" /> > > > > > > > > in my struts.xml, but I still get the error (and the default VM > locale > > > > is used, which I don't want) > > > > > > > > Torsten > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > -- > > > []'s Diego Yasuhiko Kurisaki > > > > > > > > > > > -- > > "Hey you! Would you help me to carry the stone?" Pink Floyd > > > > > > -- > []'s Diego Yasuhiko Kurisaki > -- "Hey you! Would you help me to carry the stone?" Pink Floyd
-- []'s Diego Yasuhiko Kurisaki