• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Struts 2 s:select query

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,

Ranch Hand
Posts: 94
Hibernate Eclipse IDE 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
Yup, yup, yup. Tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic