struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Re: Help with S:Select
Date Fri, 04 Dec 2009 18:47:17 GMT
the below code works to make the select option required. If nothing is selected displays the
provided message.

<s:select name = "user.department" key = "user.department" headerKey="-1" 
             headerValue="-- Please Select --" list="allDepartments" required="true"
             requiredposition="left" /> 

In validation.xml

 <field name="user.department">
          <field-validator type="fieldexpression">
               <param name="expression">!(user.department).equals("1")</param>
               <message>Please select a department.</message>

This message was sent on behalf of at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message