I have a 

In my jsp I have a Form object which contains  

String[] userIds 

which is correctly populated with a list of userIds

I want to display each of this in a list of select
boxes (one select box for each element of String[]
userId)


I have the following code in my jsp

<logic:iterate name="editClientForm"
property="userIds" id="foo">
  <tr><td>
    <html:select property="userIds" indexed="true">
      <html:options collection="users"
property="userId" labelProperty="descr"/>         
</html:select>
</td></tr>
</logic:iterate>

It displays a list of select boxes, but each select
has all of the userIds select that are in String
[]userId array.

i.e. it can get it to iterate over the collection but
the value of <html:select property="userIds" should be
current element of userId [] rather than the entire
contents of user []

This is the render HTML

<select
name="org.apache.struts.taglib.html.BEAN[0].userIds">
<option value="xyz1" selected="selected">Bill
joy</option>
<option value="xyz2">Gates</option>
<option value="xyz3" selected="selected">buck
rogers</option>
<option value="xyz4">Amy-yy Lee</option>
</select>                               

<select
name="org.apache.struts.taglib.html.BEAN[1].userIds"><option
value=""></option>
<option value="xyz1" selected="selected">Bill
joy</option>
<option value="xyz2">Gates</option>
<option value="xyz3" selected="selected">buck
rogers</option>
<option value="xyz4">Amy-yy Lee</option>
</select>

see how selected="selected" is on the first and third
element on both lists.

I only want the each list to have value selected.

The problem that I having is getting access to the
individual elements in an array.

Any help much appreciated.

This one driving me crazy




        
                
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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

Reply via email to