As far as I know, you should steer clear of using the "value" attribute to any HTML input tags. You won't get proper "memory" of what the user had entered when the page is redisplayed after a form validation error.
Someone correct me if that is not the right approach. It's what I do when I want checkboxes to be checked by default though, for example, so this seems analogous.
Erik
Wolfgang Woger wrote:
Erik Weber wrote:
Not sure about the fmt:format tag, but I use the Struts bean:write tag to format my dates:
<bean:write name="event" property="startDate" format="MM/dd/yyyy"/>
Erik
Thank you Erik,
I will try bean:write.
But by now I have an other problem. I want a new Date() as a default
value for a html-el:text element. I did:
<%
Date curDate = new Date();
String dateString = curDate.toString();
%>
<c:set var="nowDate" value="${dateString}"/>
<tr>
<td><bean:message key="someDate.displayname"/>:</td> <td><html:text property="someDate" value="${nowDate}"/></td>
But nothing can be seen in that field.
regards Wolfgang
Wolfgang Woger wrote:
Hi, I have a form with a Date:
<html-el:text property="someDate" disabled="true"> <fmt:formatDate value="${theBean.someDate}" type="date"/> </html-el:text>
The problem: the formated date is not shown at all, it should have functioned as the value of that input.
what can I do ?
Wolfgang
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]