I have a struts html form in which i have a combo box and values for this combo box will be populated from the databasevalues. I have to do this using struts custom tags.
Can any one help me out. I am new to struts cutom tags.
You'll have to use the <select> and <options> tags. In the <options> tag, there is a "collection" attribute where you can pass a collection. I'm not a Struts guru, but I guess you'll have to do all the DB stuff on the controller side to put the data in a nice little collection.
Hi, First make a call to the database in your Action class, and store the results in the form or request or session (which ever is convenient).. Then use the <html:select> and <html ptions> tag to display the values in the combo...
For example :
There’s no place like 127.0.0.1. But I'll always remember this tiny ad:
Gift giving made easy with the permaculture playing cards