From: "Kedar Deshpande" <[EMAIL PROTECTED]>
> bu then even if i pass the iterate tag a list of same lenth of required
> number of checkboxes, how would i make sure each checkbox has a unique
> 'value' value so that i know which ones are checked when the form is
> sent to the action?

The List would contain the values.  As you iterate over the List, for each
multibox, the Struts framework will render it as checked if its value
matches one of the values in the String[] that's in the Form bean.

   <c:forEach items="${accountMap}" var="item" >
       <html-el:multibox property="accounts" value="${item.key}"/>
       <c:out value="${item.key}"/> <br/>
    </c:forEach>

This uses a Map which is sitting in session scope.  Yours might be a List, I
think any Collection would do. In the example, 'accounts' is a String[]
property of the Form bean.

-- 
Wendy Smoak


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

Reply via email to