Yes so do I.
"Henrique VIECILI" <[EMAIL PROTECTED]> 05/28/2004 09:00 AM Please respond to "Struts Users Mailing List" To: "Struts Users Mailing List" <[EMAIL PROTECTED]> cc: Subject: Undeliverable Message Hi all, every time I send a message to the [EMAIL PROTECTED] I receive the message bellow. I´d like to know if you guys are receiving this message too. Regards, Henrique Viecili ----- Original Message ----- From: System Administrator To: viecili Sent: Friday, May 28, 2004 8:53 AM Subject: Undeliverable:Re: <html:options> only with bean? Your message To: Struts Users Mailing List Subject: Re: <html:options> only with bean? Sent: Fri, 28 May 2004 08:46:29 -0300 did not reach the following recipient(s): [EMAIL PROTECTED] on Fri, 28 May 2004 08:55:14 -0300 The e-mail account does not exist at the organization this message was sent to. Check the e-mail address, or contact the recipient directly to find out the correct address. <asterix.rave-tech.com #5.1.1> ----- Message from "viecili" <[EMAIL PROTECTED]> on Fri, 28 May 2004 08:46:29 -0300 ----- To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Subject: Re: <html:options> only with bean? Hi Samuel, let´s suppose in your form you have the method getArrayListValues() returning the ArrayList containing the values and the method getArrayListLabels() returning the ArrayList containing the values for each option you wanna render. Then: <html:form action="data" focus="identification"> <html:text property="identification"/> <html:select property="selectedItem"> <!-- selectedItem must be a single-valued property --> <html:options property="arrayListValues" labelProperty="arrayListLabels"/> </html:select> </html:form> I think it will work, but you can try this too: (I´m not sure it works) struts-config.xml <form-bean name="myForm" type="my.pkg.MyForm"/> in MyForm there is a method (getValuesAndLabels()) returning a collection containing beans holding the label (getLabel()) and value (getValue()) for each option. Then: <html:options collection="myForm.valuesAndLabels" property="value" labelProperty="label" />, or maybe: <html-el:options collection="${myForm.valuesAndLabels}" property="value" labelProperty="label"> Just thoughts, Henrique Viecili ----- Original Message ----- From: Samuel Rochas To: Struts Users Mailing List Sent: Thursday, May 27, 2004 6:58 PM Subject: <html:options> only with bean? Hello there, I am able to create a html select with struts when the collection to display in the options tag is a collection stored in the session or request and to use the selected value for my form. Fine. But now I have a Form representing a bean. This form has an attribute of type ArrayList. I'd like the select/options tag to show me the content of the ArrayList for the actual Form property value. I want to use the form attribute and not create a collection to store in a scope. My JSP looks like: <html:form action="data" focus="identification"> <html:text property="identification"/> <html:select property="selectedItems"> <html:options collections="allItems" property="id" labelProperty="description"/> </html:select> My form DataForm has the attributes identification, selectedItems and allItems. But it is not working. Anybody a hint? Sincerly Samuel --- andinasoft SA - Software y Consulting --- Mariano Aguilera 276 y Almagro - Quito, Ecuador Tel. +593 2 290 55 18 ---- Cel. +593 9 946 4046 --------- http://www.andinasoft.com --------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]