MG>closest example i could find is located at https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X/apps/showcase/src/main/webapp/conversion/enterAddressInfo.jsp
MG>check these comments Martin ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Tue, 26 May 2009 09:01:06 -0700 > From: shubhrakarma...@hotmail.com > To: user@struts.apache.org > Subject: submit <s:iterator> list > > > Hi, > > Does anyone knows how I can submit a list back to the action?? > I have a List<DemandRequest> that I am displaying in the jsp. DemandRequest > has Id, status, comments. Some of the fields in it are pre-populated (id) > but some of them will be added by the user (comment, status). I have it send > it back to the action where I am trying to access the list back to get the > new fields user has entered. here is a snippet of code > <s:form name="actionForm" action="SaveRequestAction" method="POST"> > <table align="center" class="dataTable" border="1"> > <tr> > <th><s:text name="id"/></th> > <th><s:text name="comments"/></th> > <th><s:text name="audit.status"/></th> > </tr> MG> reference the #session.demandRequest (unless you pushed the demandRequest list into a different scope) MG> <s:iterator value="#session.demandRequest" status ="stat" id ="demandRequest"> > <tr> > <td><s:property value="id" /></td> > <td><input type="text" MG> name="demandRequest('#stat.index').comments" /></td> > <td><input type="text" MG> name="demandRequest('#stat.index').status" /></td> > </tr> > </table> > </s:form> > > My Action has the following > public class SaveAudits extends ActionSupport { > private List<DemandRequest> _demandRequest; > @Override > public String execute() throws Exception { > // save it.... > LOG.info("demandRequest size"+ _demandRequest.size()); //MG session.put("_demandRequest",_demandRequest); > return "success"; > } > public List<DemandRequest> getDemandRequest() { > return _demandRequest; > } > > public void setDemandRequestList<DemandRequest> demandRequest) { > _demandRequest = demandRequest; > } > } > > > ----------------------- > But I am not able to access the list back in the Save Action form. Can > anyone please tell what I am doing wrong??? > > Thanks very much in advance > Tuni > -- > View this message in context: > http://www.nabble.com/submit-%3Cs%3Aiterator%3E-list-tp23726145p23726145.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > _________________________________________________________________ Insert movie times and more without leaving Hotmail®. http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd1_052009