• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

populate select with parameterized action method

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm new to struts2 and I'm trying to populate a drop down on load of a JSP page. I learned that we can do this using <s:select> tag backed by a list member variable with getters/setters in the Action class.
Something like this:

Here's the POJO


Here's the Action class


I get the loggedInUserId parameter as a URL param in the JSP.
How do I pass that parameter to the populate method in TestAction?
What should be the corresponding struts.xml configuration and so on?

Any sample code is appreciated.

Thanks in Advance
Vijay
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic