struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ludovic Maitre <>
Subject Re: Dates
Date Mon, 16 Jun 2003 12:45:11 GMT
Thanks, i already know the Caldendar classes, it helps but with this 
solution i must create three new form variables for each date on a page 
of my form, which is not what i want since my date is attached to 
another object and i want that each date had her "normal" property name 
(for example myobject1.myobject2.birthDayDate) to remember to which 
object my date is attached [because i can have a lot of date in one form 

With the solution you proposed i must add 3 different variables for each 
date in my application, which is not feasible (it's possible but it's 
lot of code i think, i have 200+ classes in my project, with a lot of 
them having dates as property).

For the moment i use the solution i have attached to my precedent mail 
and for my future projects i will use my own wrapper class around 
java.util.Date., because i don't want to create 3 new variables per date.
Anybody had another idea ?

My actual code for displaying date is :

Caller page :
<nested:nest property="birthdayDate">
	<jsp:directive.include file="DateNest.jsp"/>

DateNest.jsp :
<td nowrap="true">
<nested:select property="date">
	<html:option value="">--</html:option>
	<c:forEach var="i" begin="1" end="31">
		<html-el:option value="${i}"><c:out value="${i}"/></html-el:option>
<nested:select property="month">		
	<html:option value="">--</html:option>
	<c:forEach var="i" begin="0" end="11">
		<html-el:option value="${i}"><c:out value="${1+i}"/></html-el:option>
<nested:select property="year">		
	<html:option value="">----</html:option>
	<c:forEach var="i" begin="0" end="120">
		<html-el:option value="${i}"><c:out value="${1900+i}"/></html-el:option>

(i re-attach this code because it was errors in my last email)

Ludovic Maître

Factory Productions                 | Tél: (33) 04 93 07 08 00
149, avenue des mimosas             | Fax: (33) 04 93 07 04 02
06700 Saint-Laurent-du-Var (France) | Web:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message