enginblack
Programmer
Hi people,
Please help me...
I'm a struts beginner developer, I'm trying to pass an arraylist of objects in a jsp using the session.
In the jsp I see the list of the objects correctly, and I need to change the value of one of the fields,for each of the objects, using a combo-box.
The combo-box contains a "<options collection.../>" that is ok.
But when I set the value for each element of the list and I click on the sumbit, in the execute() of the action I recieve the list in the session with non value set.
Here the code in the jsp:
.....
<logic:notEmpty name="contacts">
<logic:iterate name="contacts" id="one" indexId="numRiga" >
<tr><td colspan="3">
CONTACTS:<BR>
Number: <bean:write name="one" property = "number"/> - <bean:write name="one" property = "year"/>
Date: <bean:write name="one" property = "date"/> <br>
Name: <bean:write name="one" property = "name"/> <br>
Country:<html:select name="one" property = "country">
<htmlptions collection="countries" property="code" labelProperty="countryName" />
</html:select>
</td></tr>
</logic:iterate>
</logic:notEmpty>
......
Why doesn't it works ???
Many thanks
Please help me...
I'm a struts beginner developer, I'm trying to pass an arraylist of objects in a jsp using the session.
In the jsp I see the list of the objects correctly, and I need to change the value of one of the fields,for each of the objects, using a combo-box.
The combo-box contains a "<options collection.../>" that is ok.
But when I set the value for each element of the list and I click on the sumbit, in the execute() of the action I recieve the list in the session with non value set.
Here the code in the jsp:
.....
<logic:notEmpty name="contacts">
<logic:iterate name="contacts" id="one" indexId="numRiga" >
<tr><td colspan="3">
CONTACTS:<BR>
Number: <bean:write name="one" property = "number"/> - <bean:write name="one" property = "year"/>
Date: <bean:write name="one" property = "date"/> <br>
Name: <bean:write name="one" property = "name"/> <br>
Country:<html:select name="one" property = "country">
<htmlptions collection="countries" property="code" labelProperty="countryName" />
</html:select>
</td></tr>
</logic:iterate>
</logic:notEmpty>
......
Why doesn't it works ???
Many thanks