facebook

Validation of Select Box

  1. MyEclipse IDE
  2.  > 
  3. Spring Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #320220 Reply

    raj82raj
    Member

    Hi,

    I have Scaffolded Spring MVC application using MyEclipse for Spring 9. The Scaffold application works well.

    Now, i am customizing it as per my needs and i am required to add single value select combo box and multipule value select combo box. I have been successful in getting both the combos using following code.

    
    <form:select id="business_org" path="organization.orgId" size="1" cssStyle="width:300px;" >
                                 <form:option value="-1" label="---- Please Select -----" />
                      <form:options items="${orgList}"/>
                       </form:select>                         
    
    
    <form:select id="business_category" path="selectedCategories" multiple="true" cssStyle="width:200px;" >
                     <form:options items="${categoriesList}" itemValue="categoryId" itemLabel="name"/>
                                  </form:select>
    
    

    Now, i want to add client side validation to force user to select values. All other fields are validated properly using DOJO [i.e Spring.addDecoration… ] but i am not able to apply same for <form:select> element. I tried following …

     <script type="text/javascript">Spring.addDecoration(new Spring.ElementDecoration({elementId : "business_org",widgetType : "dijit.form.Select",widgetAttrs : {promptMessage: "<fmt:message key="business.name.help"/>",required : true}})); </script> 
    

    but it is not working.

    I searched on internet and searched spring documentation but it seems it has been documented properly.Any help in this regard would be greatly appreciated.

    Thanks in advance,
    Raj

    #320287 Reply

    raj82raj
    Member

    Hello,

    I am still stuck here. If any one can help me with this, that would be great.

    Thanks in advance,
    Raj

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Validation of Select Box

You must be logged in to post in the forum log in