This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes how to make a option selected in <s:select> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to make a option selected in <s:select> " Watch "how to make a option selected in <s:select> " New topic
Author

how to make a option selected in <s:select>

Pradeep Chaubey
Greenhorn

Joined: Jun 15, 2009
Posts: 20
HI Experts,
I am facing a problem to make a option selected in <s:select> when page get render.
I am using following codes:
In Action Class

I have getter and setter of the all properties declared above.
ClientTypeModel is a bean, details as follows :


In Jsp I am using following code :


When page get rendered, every time first option get Selectd by default, Even if I assign the last option value of the list
to variable "selectedClient" in the action class.

Please help me to sort out this problem.
 
Don't get me started about those stupid light bulbs.
 
subject: how to make a option selected in <s:select>
 
Similar Threads
How to retreive multiple select in s:select
Problem with select tag in struts 2
Struts 2 list box problem
Something wrong with my <s:select>
Need help regarding s:select tag list