my dog learned polymorphism*
The moose likes Struts and the fly likes [Struts2] Setting up preselection in s:select tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "[Struts2] Setting up preselection in s:select tag" Watch "[Struts2] Setting up preselection in s:select tag" New topic
Author

[Struts2] Setting up preselection in s:select tag

kartik krishnan
Ranch Hand

Joined: Nov 19, 2006
Posts: 63
Hi All,

I am a newbie on Struts2 and I have come across a problem to which I can not figure out the solution. I have iterating a list and I have property in the object that is to be displayed. If the property for that bean's attribute has to be changed then there is a pull down menu for that purpose. My iterator code is as follows:



I am not able to pre select the value from select tags. The value of status attribute is either OPEN or CLOSED and can not be anything else. Is there anything that I am doing wrong? There has to be a drop down for that attribute in every row. I am not able to get it to preselect.
Girish Wakure
Greenhorn

Joined: Apr 14, 2010
Posts: 28
kartik krishnan wrote:
I am not able to pre select the value from select tags. The value of status attribute is either OPEN or CLOSED and can not be anything else. Is there anything that I am doing wrong? There has to be a drop down for that attribute in every row. I am not able to get it to preselect.


Code works fine. it shows dropdownbox in each row with three values
1 Change Status
2 OPEN
3 CLOSE

if you want only OPEN or CLOSE in dropdown boxes try this

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [Struts2] Setting up preselection in s:select tag