Hi Merrill,
Thanks so much for your inputs, i have seen your many postings and got the good information, still i have some issues, it would be great if you can help.
My issue is, i can display the values in the jsp page, but when i try to submit the page, modified values are not populating to the form bean, instead old values are populating.
My code details are -
In my Action class, i have a ArrayList, which holds list of 'Profile', the 'Profile' Class has one property name 'Rating' and a collection of 'ProfileComponent' and 'ProfileComponent' has a property named 'Value'. My requirement is loop through top ArrayList and display one row each for one ArrayList element, and in each row display first 'Rating' and then loop through collection of 'ProfileComponent' and display the property 'Value'. The display part is fine, but when the user modifies the 'Rating' or 'Value' (of 'ProfileComponent'), the modified 'Rating' values are reflecting in ActionForm bean, but the modified 'Value' are not reflecting in ActionForm bean.
JSP Code:
------
<nested:iterate name="spreadActionForm" id="spreadItem" property="spreadList" >
<tr>
<td>
<html:text name="spreadItem" property="rating" indexed="true" />
</td>
<nested:iterate name="spreadItem" property="profileCompoList" id="profileComp">
<td>
<nested:text name="profileComp" property="value" indexed="true" />
</td>
</nested:iterate>
</tr>
</nested:iterate>
-------------------------------------------
ActionForm :
--------------
public void setSpreadList(List spreadsList){ this.spreadList = spreadsList;}
public List getSpreadList(){ return this.spreadList;}
private List spreadList;
public Profile getSpreadItem(int index){
if(this.spreadList == null){ this.spreadList = new ArrayList();}
return (Profile) spreadList.get(index);}
Profile class:
--------------
public ArrayList getProfileCompoList(){ return this.profileCompoList; }
public void setProfileCompoList(ArrayList profiles){ this.profileCompoList = profiles ; }
private ArrayList profileCompoList;
public String getRating() { return rating; }
public void setRating(String rating) { this.rating = rating; }
private String rating;
public ProfileComponent getProfileComp(int index){return ((ProfileComponent)profileCompoList.get(index));}
ProfileComponet class:
-------------------
public double getValue() { return value; }
public void setValue(double value) {this.value = value; }
private double value;
-----------------------------
Thanks so much in Advance.