Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 98244 invoked from network); 20 Nov 2006 20:47:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Nov 2006 20:47:03 -0000 Received: (qmail 94911 invoked by uid 500); 20 Nov 2006 20:47:02 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 94881 invoked by uid 500); 20 Nov 2006 20:47: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 94870 invoked by uid 99); 20 Nov 2006 20:47:02 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Nov 2006 12:47:02 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of adamk1@gmail.com designates 66.249.82.231 as permitted sender) Received: from [66.249.82.231] (HELO wx-out-0506.google.com) (66.249.82.231) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Nov 2006 12:46:50 -0800 Received: by wx-out-0506.google.com with SMTP id t11so2216585wxc for ; Mon, 20 Nov 2006 12:46:29 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=GcyJPXnHk1l7YbT2mvEyxlujNrRVDDR/h1ybnjDd3sj5ejr9JdVQlMg7JM0lMbPk4eb9L+oUs2Pt3hX9OVD0zwefzYbIDQopB0KcJ5MeVj73ZK+VuJNHXYT5bUlRrZMKJYpSYPKjO/BQZXI+OKN613C2xq0iD7nycbCN98QNQdA= Received: by 10.70.52.1 with SMTP id z1mr10444566wxz.1164055568037; Mon, 20 Nov 2006 12:46:08 -0800 (PST) Received: by 10.70.69.5 with HTTP; Mon, 20 Nov 2006 12:46:07 -0800 (PST) Message-ID: <250ac0a60611201246o10e2c6c8wedca096c58ff6246@mail.gmail.com> Date: Mon, 20 Nov 2006 14:46:07 -0600 From: "Adam K" To: "Struts Users Mailing List" Subject: Re: Indexed Property and Hand Cranking Lazy List In-Reply-To: <7b809eef0611201239w514cd56awf1d3a6fa0b5f58a7@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_21643_23664891.1164055567511" References: <250ac0a60611201121g10fe6762q644014b7a8a55179@mail.gmail.com> <7b809eef0611201239w514cd56awf1d3a6fa0b5f58a7@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_21643_23664891.1164055567511 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I had modified it after you are correct, I am trying to get it to fit in with my work. Hubert are you suggesting what I am trying to do will not work in the manner I am trying to do it ? thanks in advance On 11/20/06, Hubert Rabago wrote: > > Struts is getting confused by: > > > public List getSkills() { > > return skills; > > } > > > public void setSkills(Product skill) { > > this.skills.add(skill); > > } > > The getter and setter should be consistent. > > ----- > > Hmm... I just looked at the link you sent and it looks like your code > was modelled after that. I've never done it that way, and I would not > have expected it to work. What I've done in the past is much closer > to the examples under the "Using Commons Collections for lazy Lists" > section, where the getter and setter return and accept the same type. > > Hubert > > > On 11/20/06, Adam K wrote: > > Hello all, I am sorry to subject this list to yet another person who > doesn't > > understand something, but I can't for the life of me figure out hand > > cranking lazy lists. > > > > I am using 1.2.9 with java 1.5.0_06 And I can't get lazy lists to work. > > > > I am trying to use what I found at : > > > > http://wiki.apache.org/struts/StrutsCatalogLazyList > > > > And as such have : > > In the ProdSelectionFrom: > > > > private List skills = new ArrayList(); > > > > public List getSkills() { > > return skills; > > } > > > > // non-bean version so as not to confuse struts. > > public void populateSkills(List skills) { > > this.skills.addAll(skills); > > } > > > > public void setSkills(Product skill) { > > this.skills.add(skill); > > } > > > > public Product getSkills(int index) { > > > > // automatically grow List size > > while (index >= skills.size()) { > > skills.add(new Product()); > > } > > > > return (Product)skills.get(index); > > } > > > > In the JSP: > > > > id="skills"> > > > > > > > indexed="true"/> > > > > > > > > > > And can't even get this to display properly. > > I am getting the error message: > > > > No getter method for property: "skills" of bean: "ProdSelectionForm" > > javax.servlet.ServletException: javax.servlet.jsp.JspException: No > > getter method for property: "skills" of bean: "ProdSelectionForm" > > > > > > Could someone please point me in the right direction as I am at my wits > end > > on this. > > > > The entire point of what I am trying to do is to be able to post a list > of > > information about a product (such as description, number, price etc) and > > allow the user to edit the number and have them submit the form so that > I > > can update a database with a new order. > > I am using a product Object which has all of the characteristics > mentioned > > before as well as others, and each of them have publically available > getter > > and setter methods. > > > > I would also like to confirm that the comment I read that I should be > using > > strictly strings when dealing with the jsp is correct - can someone > confirm > > that ? > > Also is there a problem using ArrayList over List ? > > > > Thanks so much for any thoughts/ time you can give me. > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > For additional commands, e-mail: user-help@struts.apache.org > > ------=_Part_21643_23664891.1164055567511--