struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Broadhurst <hou1...@gmail.com>
Subject Another Date Time Format
Date Sat, 29 Jan 2011 04:28:44 GMT
Hi,

I am displaying two date-time fields from my demographics object which
populates from the DB:

<s:date name="demographics.creationDate"/>
<s:date name="demographics.lastModificationDate"/>

Both fields show the full date and time. Perfect.
I need the creation date to go back in unchanged on form submit. Tried this:

<s:hidden name="demographics.creationDate"/>

But only populates the date into hidden field and when it goes back into DB,
the time is 00:00:00. No Good.
Is there a version of this:

<s:hidden name="demographics.creationDate"
value="%{demographics.creationDate}"/>

that I can use a date-time function also to get the hidden field to use full
date-time? I haven't messed formatting the the field
in my action first because it is already in that format as shown by the
s:date displayed values.

Or is there a better way to do it?

Thanks,

Nick

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message