Hi,

I need to display a list of String objects and let the user edit them, when
the user submits the forms my List should be having the updated values.

*Action:
**private* List<String> inputStrings;
*

public* String execute() {
*if*(inputStrings==*null*){
 inputStrings = *new* ArrayList<String>();
 inputStrings.add("PQR");
 inputStrings.add("ABC");
}
*JSP:*
<s:iterator value=*"inputStrings"* status=*"sts"*>
    <s:textfield name=*"inputStrings[%{#sts.index}].value"* value=""></
s:textfield>
</s:iterator>
I can correctly display the list of Strings (in the inputStrings of action )
using the <s:property /> in the iterator body, but not able to figure out
what should be put in the value attribute to display and submit the action.
Could someone give me any pointers with the OGNL here.

Thanks,
JK.

PS: I am able to display and retrieved the edited values of list of domain
objects but not a list of String.

Reply via email to