working example to use html:optionsCollection
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jhansi_Patnala
Posted On:   Friday, August 18, 2006 12:21 AM

Hi,
Can anyone give me a working example to use html:optionsCollection. I have to retrieve key and value pairs for a select box from data base and also should set a value to be selected by default. I am more confused about writing the form beans for collection object.

Hope someone would help me quickly.

Thanks,
Jhansi

Re: working example to use html:optionsCollection

Posted By:   Jiten_Nikhil  
Posted On:   Friday, August 25, 2006 02:13 AM





The 'value' in the optionCollection is the value when you get through formObject.getTechnology."technology" being the 'property' name in the html:select. 'label' in the optionCollection is the name of the DTO property that you use to look at the values in the drop down menu!Say for ex. the Technology names!


Hope it gets you started!



Jiten
About | Sitemap | Contact