See my comments below.

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 15, 2003 11:40 AM
Subject: questions about struts validator


> Hello -
>
> After reading the struts validator documentation, I had some
> questions about it and was wondering if anyone knows the answer
> off the top of their head...
>
> Here are some questions:
>
> 1. Is there documentation on what <var-name>'s are available for
> the standard Validators (the ones that came with the Struts1.1b3
> webapp, in validate-rules.xml)? Otherwise... I can read the
> javaScript.... and scan for it I guess.
>
I haven't found one yet but here is a list of variables for the built-in
validation rules (in the <rule name>:<variable name> format):
required : no variable
minlength : 'minlength' variable
maxlength: 'maxlength' variable
range : 'min' and 'max' variables (both required)
byte, short, int, long, float, double: no variable
date: either 'datePatternStrict' or 'datePattern' variable (one of them
required)
creditCard: no variable
email: no variable
mask: 'mask' variable

> 2. If the form bean and the associated action mapping both has
> <form> element defined, how does the validator run?  Is it combined,
> i.e. validate via action mapping rule then form rules..? or only
> the last defined gets validated? or?
>
Not sure what you mean here. The way to associate a form bean with an action
mapping is through the "name" attribute in the <action> element.

> 3. How are duplicated forms of the same name handled? that is, does
> the last one found takes precedence?
>
First of all, this is not recommended - all form beans should be assigned a
unique logical name. That said, the implementation uses a HashMap to store
form beans. Hence, the last one wins.

> 4. I am guessing that - the message resource that gets picked up by
> the validator, is the same message resource that gets picked up by
> something like <bean:write> in the same application (modularized or
> not modularized)?  Just need to check.
>
Yes. It is the same message resource.

> That's all so far :)
> Thanks in advance.
>
> Ying
>
> __________________________________________________________________
> The NEW Netscape 7.0 browser is now available. Upgrade now!
http://channels.netscape.com/ns/browsers/download.jsp
>
> Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.435 / Virus Database: 244 - Release Date: 1/1/2003

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

Reply via email to