Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[Struts2] Setting up preselection in s:select tag

 
kartik krishnan
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic