Getter and setter functions of form bean work properly. also using the iterator tag, i am able to show values on the jsp page. but when the user changes those values and the control goes to the action class, the values are not changed inside the list.

Ted Husted

If the list you are displaying is represented as an array, then it should be repopulated from the request. The usual way to go about handling duplicate parameters is


private String[] items = {"",""};
public String[] getItems() {
    return this.item;
}
public void setItem(String item[]) {
    this.item = item;
}

In the form, you can then write out the array out using the iterate tag


<logic:iterate name="logonForm" property="items" id="item">
<TR>
<TD>Item:</TD>
<TD>
<input type='text' name="item" value='<bean:write name="item"/>'></TD>
</TR>
</logic:iterate>

HTH, Ted

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact