Good Day,

Thanks once again.

Regards,
Mark P Ashworth
http://www.connext.co.za



Jeromy Evans - Blue Sky Minds wrote:
> 
> Mark P Ashworth wrote:
>> Good Day,
>>
>> Thank you for your help. I created properties that return string
>> representations of the date & time values and I use the jscalendar
>> component
>> to select the date & times. Seems to work just grand. I have only one
>> issue
>> that if the date string could parsed then it does not report the
>> exception
>> even though I throw ParseException in those properties. Should I be using
>> validation to parse the submitted values?
>>
>> Regards,
>> Mark P Ashworth
>> http://www.connext.co.za
>>   
> Great!  Yes, don't throw an exception in your property setter as it will 
> just be lost.  Convert it to a Date if you can.
> Then use the date validator to check the actual Date property.  It will 
> call any getter you name in the xml file, so point it at a Date getter, 
> not the String.
> Alternately implement Validatable in your action and implement your own 
> logic in the validate method.
> 
> Also, if you keep a reference to the String value and provide a getter 
> for it, you can return the original (invalid) value back to the form if 
> it fails validation (although I'm not sure that jscalendar will accept
> it).
> 
> This is a link how to use the Validatable interface:
> http://today.java.net/pub/a/today/2006/01/19/webwork-validation.html
> 
> Hope that makes sense.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-S2.0.8--datetimepicker....-is-it-a-train-wreck--tf3913835.html#a11139901
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to