sma3har wrote:

How can I disable a particular checkbox based on a
value in the
selected items. Here is my code.
There are two arraylist of disease and names.

<logic:iterate id="disease" name="AddressForm"
property="diseases">
<logic:iterate id="name" name="AddressForm"
property="names">
<bean:write name="disease" property="label"/>
<html:multibox property="selectedItems" >
</html:multibox>
</logic:iterate>
</logic:iterate>

Someone please help me.

From the documentation [1]:

"Renders an HTML <input> element of type checkbox, whose "checked" status is initialized based on whether the specified value matches one of the elements of the underlying property's array of current values.

"The value to be returned to the server, if this checkbox is selected, must be defined by one of the following methods:

* Specify a value attribute, whose contents will be used literally as the value to be returned. * Specify no value attribute, and the nested body content of this tag will be used as the value to be returned."

So, you need to add either a value attribute or some body content to your html:multibox tag so it knows what value to look for in the selectedItems array.

L.

[1] http://struts.apache.org/struts-taglib/tlddoc/html/multibox.html


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to