Hi
I am trying to use simple if-else logic here.
Date formatter -
<jsp:useBean id="now" class="java.util.Date" />
<fmt:formatDate var="currentdate" value="${now}"
pattern="dd/MM/yyyy"/>
If my indexed property in the form returns null, I use the current date.
<c:choose>
<c:when test="${form.startDate[0] != null}">
<bean:define id="date" name="form" property='<%= "startDate[" + 0 + "]"
%>'/>
</c:when>
<c:when test="${form.startDate[0] == null}">
<bean:define id="date" value="<%=currentdate%>"/>
</c:when>
</c:choose>
This is to populate my html:text box like this
<html:text value="<%=date.toString()%>"
Is something wrong here ? It seems that the variable "date" is not found
at runtime.
Thanks,
Mohan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]