Return-Path: Mailing-List: contact struts-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list struts-user@jakarta.apache.org Received: (qmail 44758 invoked from network); 1 Mar 2001 01:27:46 -0000 Received: from mail.websidestory.com (209.75.20.4) by h31.sny.collab.net with SMTP; 1 Mar 2001 01:27:46 -0000 Received: from ted4268 (ip.10-100-60-12.hitbox.com [10.100.60.12] (may be forged)) by mail.websidestory.com (8.9.1a/8.9.1) with SMTP id RAA21878 for ; Wed, 28 Feb 2001 17:27:37 -0800 (PST) From: "Ted Bergeron" To: "Struts-User" Subject: Form tags Date: Wed, 28 Feb 2001 17:28:03 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N I'm wondering about the logic behind the form tags. Here I have a simple form that is created by iterating over a collection. The iterator exposes the variable "item" which is a String for this simple case. The name attribute of bean:write treats "item" as a variable, while the value attribute of various form tags (radio, text, hidden) treats "item" as a literal. Thus, the "<%= item %>" workaround. This workaround leads to code that is not well formed xml, and becomes much uglier with a collection of complex objects. Am I using the framework incorrectly? Is this an oversight/bug? Is this a necessary behavior? Thanks for the help, Ted <% java.util.ArrayList list = new java.util.ArrayList(); list.add("First"); list.add("Second"); list.add("Third"); list.add("Fourth"); list.add("Fifth"); pageContext.setAttribute("list", list, PageContext.PAGE_SCOPE); %>