Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 80393 invoked from network); 7 Feb 2008 11:33:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Feb 2008 11:33:18 -0000 Received: (qmail 12677 invoked by uid 500); 7 Feb 2008 11:33:02 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 12639 invoked by uid 500); 7 Feb 2008 11:33:02 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 12628 invoked by uid 99); 7 Feb 2008 11:33:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Feb 2008 03:33:02 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Feb 2008 11:32:33 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1JN4zf-000498-S7 for user@struts.apache.org; Thu, 07 Feb 2008 03:32:39 -0800 Message-ID: <15331960.post@talk.nabble.com> Date: Thu, 7 Feb 2008 03:32:39 -0800 (PST) From: Piotr Falenczyk To: user@struts.apache.org Subject: Struts2, collection of objects and JSP MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: pfal@o2.pl X-Virus-Checked: Checked by ClamAV on apache.org Hello I have a following problem I have an action defined, let's say: public class SomeAction extends ActionSupport implements SessionAware{ private Map sessionMap; @Override public String execute() throws Exception { return SUCCESS; } public void setSession(Map map) { this.sessionMap = map; } public long getSideId() { return sideId; } public List getImports() { return (List)sessionMap.get("imports"); } public void setImports(List imports) { sessionMap.set("imports", imports); } } The Import class is a simple POJO public class Import extends Serialicable { private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } } I need to display all the names of Imports, and allow to edit every one of them in one page. What I do now is somethin like that ion JSP. Displaying values work just fine, but I canno't change them (not stored back in the session)
What I know is that I need to set for name of every textfield "imports[index_in_list].name" in order to make it work, but how can I do it? Thanks for help in advance Piotr Falenczyk -- View this message in context: http://www.nabble.com/Struts2%2C-collection-of-objects-and-JSP-tp15331960p15331960.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org