struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Data Object and Calendar
Date Wed, 01 Aug 2001 08:46:31 GMT


I solved this problem using JavaScript (if Java behaves with the same way,
it will work for Java too). I compared resulting values of day, month and
year for destination date after setting this properties. If they're
different, date is invalid.
I include my JavaScript version here: (See attached file: validate.js)

Andrei Mamitchev
ICQ#: 89581227

I have a Data Object (DO) that we use to throw b/w our EJBs and forms.

1.  In one particular DO, I am using the Gregorian Calendar to set day,
and year.
2.  I am using the validation framework to validate that day is b/w 1-31,
month is b/w 1-12 and year is b/w 2001 and 2100.

The validation framework is not validating day or month, because with the
gregorian calendar in my getters/setters - you can set a day or a month to
number and it will simply increment the calendar.

Does anyone know of a way to get around this?  I'd like to NOT use
but I want to validate the value the user entered, rather than the value
the DO using getValue();

View raw message