File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Lisbox validation in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Lisbox validation in struts" Watch "Lisbox validation in struts" New topic

Lisbox validation in struts

Priya Jotwani
Ranch Hand

Joined: Oct 30, 2002
Posts: 53

I have a JSP Page where I have a multiple selection Listbox. When the user submits the page, there should be some values in this listbox. How do I make the validations for the same in validator.xml ?
I have done similar thing for dropdown by the following entry in validator.xml

<field property="reportType" depends="required ">
<arg0 key="prompt.reportType"/>

How can I achieve the similar thing for Multi Select ListBox ?

Sheldon Fernandes
Ranch Hand

Joined: Aug 18, 2004
Posts: 157
See my reply to a previous post. I have not yet tried it out. But it should work.

Do let us know the outcome.
Sheldon Fernandes
chaitanya kapileshwarkar

Joined: Oct 03, 2004
Posts: 2
Hi Sheldon,

Thanks for your reply but that doesn't seem to work.

Any inputs ??

Sheldon Fernandes
Ranch Hand

Joined: Aug 18, 2004
Posts: 157
Some details would help.
- Form Bean (code snippet of attribute mapped to listbox and its methods)
- validation.xml (relevant field's entry)
- <html:select> used in jsp (just to confirm that values are being submitted properly)

Sheldon Fernandes
I agree. Here's the link:
subject: Lisbox validation in struts