You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Michael Kastner <ka...@galt.de> on 2004/04/26 20:32:47 UTC

Re: date validation (revisited)

Hello,

thanks to all, who commented on my question. At least now I know, that 
my approach is not working the way I hoped it would :-( . It looks like 
when I want to use a date field in a DynaValidatorForm this is not 
really the best thing to do.

So I will use a regular extended ActionForm, since I really want _any_ 
validation and type conversion to take place there.

However, DynaBeans seem a useful approach for situtions, where date 
fields are not part of the user input.

I might take a look at the other approaches, which were mentioned.

Thanks for all your remarks.

Michael Kastner


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: date validation (revisited)

Posted by Nathan Maves <Na...@Sun.COM>.
What not extend DynaValidatorActionForm and let the validation 
framework do all of the easy validation and the do the Date specific 
validation in your own validate method.

Nathan

On Apr 26, 2004, at 12:32 PM, Michael Kastner wrote:

> Hello,
>
> thanks to all, who commented on my question. At least now I know, that 
> my approach is not working the way I hoped it would :-( . It looks 
> like when I want to use a date field in a DynaValidatorForm this is 
> not really the best thing to do.
>
> So I will use a regular extended ActionForm, since I really want _any_ 
> validation and type conversion to take place there.
>
> However, DynaBeans seem a useful approach for situtions, where date 
> fields are not part of the user input.
>
> I might take a look at the other approaches, which were mentioned.
>
> Thanks for all your remarks.
>
> Michael Kastner
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: date validation (revisited)

Posted by Hubert Rabago <ja...@yahoo.com>.
You might've misunderstood some points.  ActionForm fields *really* should
use strings, whether or not you're using DynaActionForm or not.  The reason
for this is to allow the field to hold valid values as well as invalid
values.  The cases I've seen where a field isn't a String is when the field
is mapped or indexed.  Even then, individual values in the map or list would
still be Strings.

Hubert

--- Michael Kastner <ka...@galt.de> wrote:
> Hello,
> 
> thanks to all, who commented on my question. At least now I know, that 
> my approach is not working the way I hoped it would :-( . It looks like 
> when I want to use a date field in a DynaValidatorForm this is not 
> really the best thing to do.
> 
> So I will use a regular extended ActionForm, since I really want _any_ 
> validation and type conversion to take place there.
> 
> However, DynaBeans seem a useful approach for situtions, where date 
> fields are not part of the user input.
> 
> I might take a look at the other approaches, which were mentioned.
> 
> Thanks for all your remarks.
> 
> Michael Kastner
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 



	
		
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25�
http://photos.yahoo.com/ph/print_splash

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org