Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

Struts2 iterator tag

BGE Ger

2008-07-03

Replies:

Author LoginPost Reply

Hello,
I'm struts(2) newbie and I need some help for the iterator tag.
How can I access to an updated list in the action class?
My JSP looks like:

<s:form theme="simple">
 <s:iterator  value="descList" status="stat">
 <tr>
     <td ><s:textarea name="descList[%{stat.index}].destination"
value="%{destination}"  /></td>
     <td ><s:textarea name="descList[%{stat.index}].category"  
value="%{category}"  /></td>
     <td ><s:textarea name="descrList[%{stat.index}].source"  
value="%{source}" /></td>
     <td><s:textarea name="descList[%{stat.index}].text"
value="%{text}"/></td>
 </tr>
 </s:iterator>
    <s:submit action="updateDescriptions" />
</s:form>

---------------------------------------------------------------------
Action class:


public class DescriptionTestAction extends ActionSupport {

 private List<Text> descList;
 
 public DescriptionTestAction () {
 }

 
 public void setDescList(List descList) {
   this.descList = descList;
 }
 
 public List getDescList () {
  return this.descList;  
 }

--------------------------------------------------
The descList is a spring Bean and everything works well except the update
process.
If I make an update for the destination field e.g. and then submit this form
the descList contains the old values! I've tried everything and spend lot
of time for searching for a solution, please help!
Thank you in advance!

--
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 gg3721.com - Jax Systems, LLC, U.S.A.