Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@www.apache.org Received: (qmail 29913 invoked from network); 21 Nov 2003 17:47:48 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 21 Nov 2003 17:47:48 -0000 Received: (qmail 54557 invoked by uid 500); 21 Nov 2003 17:47:24 -0000 Delivered-To: apmail-jakarta-struts-user-archive@jakarta.apache.org Received: (qmail 54351 invoked by uid 500); 21 Nov 2003 17:47:23 -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 54338 invoked from network); 21 Nov 2003 17:47:23 -0000 Received: from unknown (HELO kgb01.kgbinternet.com) (192.197.110.220) by daedalus.apache.org with SMTP; 21 Nov 2003 17:47:23 -0000 Received: from keyboardmonkey.com (samsara [24.72.2.198]) by kgb01.kgbinternet.com (8.11.6/8.11.6) with ESMTP id hALHlQK13971 for ; Fri, 21 Nov 2003 11:47:26 -0600 From: "Arron Bates" To: "Struts Users Mailing List" Subject: Re: - Transfering multiple values in >option> Date: Sat, 22 Nov 2003 03:47:26 +1000 Message-Id: <20031121174726.M94721@keyboardmonkey.com> In-Reply-To: References: X-Mailer: Open WebMail 1.70 20020712 X-OriginatingIP: 12.163.94.169 (struts-user@keyboardmonkey.com) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 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 Dirk, A standard problem. Many people implement some kind of lookup system to fetch things like drop down values and such. You are right, you do only get the ID, and it's going to be up to you to fetch the value from somewhere if you want to show it to the user again. Most likely the same place that got you the options in the first place. The common solution people gravitate towards is keeping such objects as singletons in memory. That way the lookups are nice and speedy. In summary I'm sorry to say that nothing in life is free :) All the best. Arron. > Hello, > > I'm a student and new to Struts and I've got the following problem, > which I have to describe textually, cause the code has not been > implemented yet: > > I've got a form with data to ..ehm... consider a car, which is a > value object. This object is stored as an attribute in an > ActionForm. Every car has got a product group, which again is an > value object and stored inside the car object of the ActionForm. > > So in the JSP-form I use nested-tags. The root tag is the ActionForm. > Then > And then follows a - box, showing > the names of product groups as labels. The values are the identification > codes of these product groups. It's only possible to choose one of > the groups. > > Now, if I submit the form, the choosen product group will be stored inside > the car object and the car object inside the form object. > But only the id of the product group is stored, whereas the label is > not. > > And thats my problem, because I'd like to show the name of the > choosen product group on a following jsp-page before it will be > saved in a database. But I only get the id, cause I can't declare > more than one value for an select-box. > > Any idea or workaround? > > Thanks a lot, > Dirk Liebscher > > --------------------------------------------------------------------- > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: struts-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-user-help@jakarta.apache.org