Re: populating Drop down -pls help

2003-09-05 Thread Thomas Max
I use the html:options tag : Just create a Collection (here gender of the Databaseentries (f,m) and pass as a bean to the page with the form. html:select name=yourForm property=gender html:options collection=gender property=id labelProperty=description/ /html:select If you need more

Re: populating Drop down -pls help

2003-09-04 Thread Jan Van Stalle
Hello, I always use the html:options tag and it works fine; try the following: (there is a type error in your example) html:select property =gender html:option value=mm/html:option html:option value=ff/html:option /html:select ofcourse, in the database you should have the values f or m

RE: populating Drop down -pls help

2003-09-04 Thread Mainguy, Mike
Are those typos in your jsp? ===htrml If so, that may be part of the problem... Also, I'd check to verify that the values are not padded (i.e. CHAR(2) datatype may yield m instead of m which is not the same value. -Original Message- From: Goldy J [mailto:[EMAIL PROTECTED] Sent:

RE: populating Drop down -pls help

2003-09-04 Thread hari_s
How about if You try with this code in formbean Public String getGender() { return gender; } public void setGender(String gender) { this.gender=gender; } -Original Message- From: Goldy J [mailto:[EMAIL PROTECTED] Sent: Thursday, September 04, 2003 4:38 PM To: [EMAIL PROTECTED]

Re: populating Drop down -pls help

2003-09-04 Thread Thomas Max
I use the html:options tag : Just create a Collection (here gender of the Databaseentries (f,m) and pass as a bean to the page with the form. html:select name=yourForm property=gender html:options collection=gender property=id labelProperty=description/ /html:select If you need more

RE: Populating Drop-down

2003-06-10 Thread shirishchandra.sakhare
This is what I have found works best. On the form have a ArrayList of the dropDown elements you want. And in the action, when preparing the data, get THE list from DB and populate it in form.There is something called LabelValueBean in stuts or Scaffold packaage if you want to use label value

Re: Populating Drop-down

2003-06-10 Thread ian_d_stewart
I don't know if it's a best practice or not, but what I do is have the link to the edit screen actually point to an action, which is responsible for initializing any related collections and storing them in session-scoped attributes. A related approach would be to use the logic:notPresent tag to

RE: Populating Drop-down

2003-06-10 Thread Poon, Johnny
, June 10, 2003 7:44 AM To: Struts Users Mailing List Subject: Re: Populating Drop-down I don't know if it's a best practice or not, but what I do is have the link to the edit screen actually point to an action, which is responsible for initializing any related collections and storing them

RE: Populating Drop-down

2003-06-10 Thread Kandi Potter
Message- From: Poon, Johnny [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 9:56 AM To: 'Struts Users Mailing List' Subject: RE: Populating Drop-down Mark, I'm glad you asked the question, caz' I was wondering about the same thing. I'm using label/value. This is what I'm doing. I'm

RE: Populating Drop-down

2003-06-10 Thread Poon, Johnny
the populated form in the request? Thanks. JP -Original Message- From: Kandi Potter [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 9:22 AM To: Struts Users Mailing List Subject: RE: Populating Drop-down Hi Johnny, I'm also using label/value vectors.I don't hard-code the form-name

RE: Populating Drop-down

2003-06-10 Thread Kandi Potter
List' Subject: RE: Populating Drop-down Hi Kandi, Thanks for the post. I'm pretty new to actually using strut, I understand you mentioned Struts will look for the bean in request scope and use it if it exists, but I guess I'm not sure if I get where you actually do the dropdown form population

Re: Populating Drop-down

2003-06-10 Thread Sandeep Takhar
someone else has replied, but just some more hints. You can look at html:optionsCollection which as support for labelValueBeans. The idea about using using the tiles:controller is an excellent one, but I have not done this. You will probably want it in application context and not load them all