This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to use select tag using struts  RSS feed

 
mahendra kumar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!