aspose file tools
The moose likes JSP and the fly likes Struts Select Tag Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Struts Select Tag" Watch "Struts Select Tag" New topic
Author

Struts Select Tag

paul pavlentey
Greenhorn

Joined: Jul 20, 2006
Posts: 10
I am new to Struts
I have the following code:

Code is executing correctly,but I dont get how selected option is getting selected based on the code above. I have a question about SELECTED value in HTML Select. How does SELECTED gets selected ( selected="selected" as appears on html)

Thank you in advance.
[ December 13, 2006: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56200
    
  13

"pavlentey",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Prabhu Venkatachalam
Ranch Hand

Joined: Nov 16, 2005
Posts: 502

I guess, your question is " How Struts TLD works?"

If you say <html:select multiple="true">, container calls the TLD class, and according to the attribute values and child elements you give, it produces equivalent HTML output in the place you called.

hth,


Prabhu Venkatachalam<br />SCJP 1.4,SCWCD 1.4<br />prabhu.venkatachalam@gmail.com
paul pavlentey
Greenhorn

Joined: Jul 20, 2006
Posts: 10
Thank you for your reply.
but my question was how do you set selected value for a child element inside of select or doest it get set by Struts?
Prabhu Venkatachalam
Ranch Hand

Joined: Nov 16, 2005
Posts: 502

It seems like struts not supporting this attribute.

You can try by using below tag with iteration,

<htmlption key="" value="" selected>blah</htmlption>
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Struts Select Tag
 
Similar Threads
html:select problem-------
Struts Select Tag
JSTL vs struts tag
help on html:select for default value
Retaining selected value in html:select on page refresh