RE: [Q] select : Option - Urgent Help required.
We always use the options tag - eg if I have a collection of beans with getters and setters for label and value attributes in my form bean, I have the following in jsp: 1.1 also has a new tag to avoid the bean:define, but we haven't migrated yet. Cheers, Dave "Galbreath, Mark" <[EMAIL PROTECTED]> on 04/17/2002 09:58:51 AM Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> cc: (bcc: David Hay/Lex/Lexmark) Subject: RE: [Q] select : Option - Urgent Help required. No one on my team has been able to get the Collections iterator to work for so we are doing as I posted. If you have some insight into getting it to work, I'm all eyes! Also, the iterate name should not be enclosed in JSP session variable delimiters unless a method is being called to get the value. Mark -Original Message- From: Stuart Jameson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 17, 2002 9:34 AM You could use the tag -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: 17 April 2002 13:45 I'm not totally clear on your Region or bean attributes, but the idea is something like: // bean property to set/get // List to iterate, type is fully-qualified path, // id is arbitrary, property is List element // set the option value // set the option label Mark -Original Message- From: Sanjay Choudhary [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 17, 2002 8:23 AM > Need help with select option > > I have a formBean called RegionForm > > RegionForm contain attribute selectedregion:String > and > regions:ArrayList. > > regions:ArrayList is collection of object of class > Region. > > Region class has attributes id and String. > > I wish to display on the form select option in the > drop down box and populate it with all the items in > the regions:Arraylist and display id attribute. > Selected value should populate selectedregion:String > in RegionForm. > > I tried nested:select and html:select but no > success. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
RE: [Q] select : Option - Urgent Help required.
We already discussed this earlier today - we cannot get the Struts Collections iterator to work correctly. Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 17, 2002 1:28 PM To: Struts Users Mailing List Subject: RE: [Q] select : Option - Urgent Help required. It's much better to stick your info in a collection so you can use the tag!! Dave "Galbreath, Mark" <[EMAIL PROTECTED]> on 04/17/2002 08:44:31 AM Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> cc: (bcc: David Hay/Lex/Lexmark) Subject: RE: [Q] select : Option - Urgent Help required. I'm not totally clear on your Region or bean attributes, but the idea is something like: // bean property to set/get // List to iterate, type is fully-qualified path, // id is arbitrary, property is List element // set the option value // set the option label Mark -Original Message- From: Sanjay Choudhary [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 17, 2002 8:23 AM > Need help with select option > > I have a formBean called RegionForm > > RegionForm contain attribute selectedregion:String > and > regions:ArrayList. > > regions:ArrayList is collection of object of class > Region. > > Region class has attributes id and String. > > I wish to display on the form select option in the > drop down box and populate it with all the items in > the regions:Arraylist and display id attribute. > Selected value should populate selectedregion:String > in RegionForm. > > I tried nested:select and html:select but no > success. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
RE: [Q] select : Option - Urgent Help required.
It's much better to stick your info in a collection so you can use the tag!! Dave "Galbreath, Mark" <[EMAIL PROTECTED]> on 04/17/2002 08:44:31 AM Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> cc: (bcc: David Hay/Lex/Lexmark) Subject: RE: [Q] select : Option - Urgent Help required. I'm not totally clear on your Region or bean attributes, but the idea is something like: // bean property to set/get // List to iterate, type is fully-qualified path, // id is arbitrary, property is List element // set the option value // set the option label Mark -Original Message- From: Sanjay Choudhary [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 17, 2002 8:23 AM > Need help with select option > > I have a formBean called RegionForm > > RegionForm contain attribute selectedregion:String > and > regions:ArrayList. > > regions:ArrayList is collection of object of class > Region. > > Region class has attributes id and String. > > I wish to display on the form select option in the > drop down box and populate it with all the items in > the regions:Arraylist and display id attribute. > Selected value should populate selectedregion:String > in RegionForm. > > I tried nested:select and html:select but no > success. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
Re: [Q] select : Option - Urgent Help required.
Subject: Re: [Q] select : Option - Urgent Help required. From: Vic Cekvenich <[EMAIL PROTECTED]> === http://www.mail-archive.com/struts-user%40jakarta.apache.org/msg26863.html Yes, vi! Vic Galbreath, Mark wrote: > No one on my team has been able to get the Collections iterator to work for > so we are doing as I posted. If you have some insight into > getting it to work, I'm all eyes! > > Also, the iterate name should not be enclosed in JSP session variable > delimiters unless a method is being called to get the value. > > Mark > > -Original Message- > From: Stuart Jameson [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 17, 2002 9:34 AM > > You could use the tag > > -Original Message- > From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] > Sent: 17 April 2002 13:45 > > I'm not totally clear on your Region or bean attributes, but the idea is > something like: > > // bean property to set/get > > // List to iterate, type is fully-qualified path, > // id is arbitrary, property is List element > property="id" > type="Region" > id="region"> > // set the option value > > // set the option label > > > > > > Mark > > -Original Message- > From: Sanjay Choudhary [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 17, 2002 8:23 AM > > >>Need help with select option >> >>I have a formBean called RegionForm >> >>RegionForm contain attribute selectedregion:String >>and >>regions:ArrayList. >> >>regions:ArrayList is collection of object of class >>Region. >> >>Region class has attributes id and String. >> >>I wish to display on the form select option in the >>drop down box and populate it with all the items in >>the regions:Arraylist and display id attribute. >>Selected value should populate selectedregion:String >>in RegionForm. >> >>I tried nested:select and html:select but no >>success. >> > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>