struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Li Ying <liying.cn.2...@gmail.com>
Subject Re: Validation xml for Radio button
Date Mon, 15 Nov 2010 13:08:32 GMT
What data type of the property [yourAnswer] is ?

If it is an int property, try delete the double-quotation surrounding
the value 1.



2010/11/15 Prabhubalaji Ragavan <prabhubalaji.ragavan@gmail.com>:
> Hi
> I am using a radio option in my code. when i try to validate that thru the
> validator.xml, the validation is not happening.
>
> this is my jsp content.
>
> <s:radio label="Answer" name="yourAnswer" list="#{'1':'Yes','2':'No'}" />
>
> this is my validator.xml content
>
> <field name="yourAnswer">
>       <field-validator type="fieldexpression">
>            <param name="expression"><![CDATA[(yourAnswer == "1")]]></param>
>            <message>enter gen1</message>
>    </field-validator>
>    </field>
>
>
> Please help, am new to struts2.
>
> Thanks
> Prabhu Ragavan
>

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


Mime
View raw message