With 2.3.3, it is working for me, in my own app.
When input is returned, I can still see the timestamp value in the form.
Haven't tried with your example.


On Thu, Jun 7, 2012 at 7:39 PM, s <srrem...@excite.com> wrote:

> Yep..That's what I did....
>
> But the question is, why it retains time information, if there is no
> validation error...?
>
>
>
> -----Original Message-----
> From: "J. Garcia" [jogaco...@gmail.com]
> Date: 06/07/2012 12:21 PM
> To: "Struts Users Mailing List" <user@struts.apache.org>
> Subject: Re: Struts 2 losing timestamp in java.util.Date when validation
> failed
>
> Try using date formatting like this:
>
> <s:textfield key="student.date" value='%{getText("{0,date,dd/MM/yyyy
> HH:mm:ss.SSS}",{student.date})}'/>
>
> J.
>
> On Wed, Jun 6, 2012 at 11:08 PM, s <srrem...@excite.com> wrote:
>
> > Here's an JSPs, action class and struts.xml
> >
> > http://localhost:8080/Sample/student_edit.action       calls form/jsp
> > studentDetails.
> >
> > Erase name and submit form, this will result in validation being failed.
> >
> > This will erase timestamp from hidden field
> > <s:hidden name="student.createdTimestmp"/>
> >
> > If not validation error occurs, then it retains time.
> >
> >
> >
> > -----Original Message-----
> > From: "Dave Newton" [davelnew...@gmail.com]
> > Date: 06/06/2012 12:57 PM
> > To: "Struts Users Mailing List" <user@struts.apache.org>
> > Subject: Re: Struts 2 losing timestamp in java.util.Date when validation
> > failed
> >
> > On Wed, Jun 6, 2012 at 12:54 PM, s <srrem...@excite.com> wrote:
> >
> > > I found following work around.
> > > Sorry can't attach source JSP, because of client restrictions.
> >
> >
> > Here's the trivial workaround:
> >
> > * Create a minimally-failing example containing essentially identical
> JSP.
> > * Post it.
> >
> > Whether or not your client wishes to admit it, it's unlikely any sort of
> IP
> > law would protect the usage of a hidden field and date render in an
> example
> > JSP.
> >
> > Dave
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

Reply via email to