struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Zimmek" <>
Subject StrutsValidator + html:select
Date Tue, 17 Dec 2002 10:43:51 GMT

i have got a question about validating html:select - box.

My JSP-Source look like this:

<html:select property="productid">
  <html:option value="" key="SELECTBOX.pleaseSelect"/>
  <html:options collection="products" property="id" labelProperty="name"/>

Property "productid" is an attribute of a DynaValidatorForm.

I tried to use "depends=required" for attribute "productid" to check weather
a value ( contained in "collection=products" ) is selected.

But it seems like the validator returns true, even if an option is selected
containing a blank value ( i my case it is the  "html:option" labeled by key
"SELECTBOX.pleaseSelect" ).

Has anyone experienced the same problem and is it possible to check a
selectbox with "depends=required" at all ?

Thanks in advance
Jan Zimmek

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

View raw message