wood burning stoves 2.0*
The moose likes Struts and the fly likes how to use select tag using struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to use select tag using struts" Watch "how to use select tag using struts" New topic
Author

how to use select tag using struts

mahendra kumar
Greenhorn

Joined: May 24, 2005
Posts: 2
plz guide me how to use ths select tag .
for every options in select tag should i write the bean in actionform.

plz guide me for ths code
<select name="product_id" size="1">
<option>Widget</option>
<option ">Sprocket</option>
<option >Cog</option>
<option>Dunsel</option>
</select>

for this html code .
[/LIST]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The best way to do it is to put all the options in a List or Set and then give the HttpSession a reference to it using session.setAttribute().

You would then use the html:select and htmlptions tags to build the select control.

See the following link for more information on how to use these tags:

http://struts.apache.org/api/org/apache/struts/taglib/html/package-summary.html#package_description
[ May 24, 2005: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
 
GeeCON Prague 2014
 
subject: how to use select tag using struts