Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@apache.org Received: (qmail 21191 invoked from network); 4 Dec 2002 20:42:03 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 4 Dec 2002 20:42:03 -0000 Received: (qmail 11065 invoked by uid 97); 4 Dec 2002 20:42:51 -0000 Delivered-To: qmlist-jakarta-archive-struts-user@jakarta.apache.org Received: (qmail 11049 invoked by uid 97); 4 Dec 2002 20:42:50 -0000 Mailing-List: contact struts-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list struts-user@jakarta.apache.org Received: (qmail 11037 invoked by uid 98); 4 Dec 2002 20:42:50 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) content-class: urn:content-classes:message Subject: RE: How does Struts handle arrays of fields? Date: Wed, 4 Dec 2002 11:37:38 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thread-Topic: How does Struts handle arrays of fields? X-MimeOLE: Produced By Microsoft Exchange V6.0.6334.0 Thread-Index: AcKby4kMfGnL2ge+EdeorQAIx78tMgAAMMxg From: "Karr, David" To: "Struts Users Mailing List" X-OriginalArrivalTime: 04 Dec 2002 19:37:39.0104 (UTC) FILETIME=[9AB5E200:01C29BCC] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N If I'm seeing your problem correctly, you probably know by now that the EL only references bean properties, except when it's referencing collections :) . It checks whether something is a collection before it checks whether it is a bean, so creating a SUBCLASS of a collection class and adding bean properties won't work. You'll have to have a bean class that has a collection property, AND a size property. Try restructuring your bean to deal with that and see how far you get. > -----Original Message----- > From: David Graham [mailto:dgraham1980@hotmail.com] >=20 > I have a set of hidden fields all named "deletedId" but with=20 > different=20 > values. What type should this be in my ActionForm? It works=20 > if I have > private String[] deletedId; and related accessor methods. >=20 > My problem is that I want to use the JSTL's EL to get the=20 > size of this=20 > array. I tried ${myForm.deletedId.length} with no success so=20 > I tried using=20 > a custom Collection class with a getSize() method and=20 > ${myForm.deletedId.size}. So I have a > public Collection getDeletedId() and a > public void setDeletedId(String[] id) method. Struts=20 > apparently didn't like=20 > that I was trying to trick it and doesn't refill the array=20 > when there's an=20 > error on the form. >=20 > Any suggestions? >=20 > Thanks, > Dave >=20 > _________________________________________________________________ > Add photos to your messages with MSN 8. Get 2 months FREE*.=20 > http://join.msn.com/?page=3Dfeatures/featuredemail >=20 >=20 > -- > To unsubscribe, e-mail: =20 For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: