Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 s:select query

 
Luke Gee
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Im having a little trouble working out something and was wondering if anyone knows if this can be done and if so how.

So I have a dropdown which will be selection of actions that can be done on each user.

here is the code i have:




the listKey="action" will populate the value of the select with something along the lines of "ceaseAccount.action" etc. These will cause the page to redirect to another where the chosen options can be checked, processed and such. What i need though is to include variables on the action: something like listKey="action" + "?key=<s:text name="userKey"/>&userName=<s:text name="userName"/> giving "ceaseAccount.action?userKey=E9F81F9C-163E-42BB-9F64-20DA646D1679&userName=thisUserName" , so the output would be different for each row in the table. I know my example wont work but i hope it shows what im looking for.

Thanks in advance,

Luke
 
Yogesh Lonkar
Ranch Hand
Posts: 94
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what you can do is use onselect="doAction" attribute of <s:select/> tag which will call and java script method such has
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic