struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
Subject Re: expression validator
Date Fri, 29 Feb 2008 15:51:59 GMT
--- Martin Gainty <mgainty@hotmail.com> wrote:
> [...]

AFAICT this doesn't do client-side expression validation either. See, there
is no client-side expression validation. My comment was directed at the Roes
Indai person who implied that their tutorial would help the person with the
original question, because it doesn't address the question at all.

> declare the field validator such as the field-name declared in validators
> in
>
FieldValidatorsExampleAction-submitClientSideValidationExample-validation.xm
> l
> <validators>
>   <field name="requiredStringValidatorField">
>     <field-validator type="requiredstring">
>       <param name="trim">true</param>
>             <message key="i18n.nothing.here"><![CDATA[ required and must be
> string ]]></message>
>     </field-validator>
>   </field>
> 
> in the jsp setup a textfield which uses the preconfigured
> requiredStringValidatorField as described in this example from
> /validation/clientSideValidationExample.jsp
>            <s:textfield label="Required String Validator Field"
> name="requiredStringValidatorField" />
> 
> place the returned field error string into s:fielderror with param
> specified
> as the name of the validator item described here
>         <h3>Field Error due to 'Required String Validator Field' Will
> Appear
> Here</h3>
>         <s:fielderror>
>             <s:param value="%{'requiredStringValidatorField'}" />
>         </s:fielderror>
>         <hr/>
> 
> Make sense?

Dave



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


Mime
View raw message