• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

How to validate combo box in struts 1.3 using validation.xml file

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friends,
I have to validate a combo box that should take atleast one value if not I have to display a message to select one option.



This is xyz.jsp page:

<html:select property="userType">
<html ptions collection="userTypeList" property="id" labelProperty="userType"/><br>
</html:select>

In validation.xml file I gave

<form name="userForm">
<field property="userType" depends="required">
<arg key="userForm.userType" />
</field>
</form>

But it's not working.any know where I am wrong.
 
I'm not dead! I feel happy! I'd like to go for a walk! I'll even read a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic