Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 77400 invoked from network); 4 May 2004 17:02:54 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 4 May 2004 17:02:54 -0000 Received: (qmail 12078 invoked by uid 500); 4 May 2004 17:00:47 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 12054 invoked by uid 500); 4 May 2004 17:00:47 -0000 Mailing-List: contact user-help@struts.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 user@struts.apache.org Received: (qmail 44452 invoked from network); 4 May 2004 06:57:00 -0000 Date: Mon, 3 May 2004 23:59:04 -0700 Message-ID: From: "Richard Mixon (qwest)" To: "Struts Users Mailing List" Subject: Map backed form with list of String Arrays 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.6604 (9.0.2911.0) In-Reply-To: <000101c4319c$c8a014d0$6402a8c0@fumakilla> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I am having a problem with a map-backed form and html:select with multiple="true". Would appreciate any help/ideas. I need to display a set of "html:select" lists. The number of lists is user-defined (based on database data) and each select list must allow more than one choice to be selected. I settled on using a map property in the form bean as the manual suggests. Everything works great on initial display, furthermore I am selecting all values which will be the normal use case for the user. However, upon return, only a single value is passed in. Should I be using the "value" attribute on the html:select tag? I cannot seem to figure out how to make it work as an array. Here are the relevant struts/JSTL tags. Here is a code snipped I use to inspect the map as it comes in (afer having been successfully sent out and displayed with all values selected): Set keySet = map.keySet(); Iterator ik = keySet.iterator(); while (ik.hasNext()) { Object key = (String)ik.next(); log.debug("showMap - mapKey='"+key.toString()+"'"); Object value = map.get(key); if ( value instanceof String[] ) { String[] valArray = (String[]) value; for (int i=0;i