• 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 ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Struts 2.0 Ajax dojo

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My question is how do I get the 2nd drop down value in a struts action. I want to add both values of the boxes to the database. I can get the first but not the 2nd box.

 
Ranch Hand
Posts: 122
Mac IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your question doesnt even make any sense but in any action you can just have a getter for the list you are trying to get ... but I'm not sure if you are asking how to get the list values or if you are asking how to get the value that the user selected and when it submits the form you are trying to get that value ...
 
Todd Smith
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to get the value the user selected in the secound drop down box. I wanted to add a submit button that calls a struts action to update the database with the 2 values from the drop down box. The first box has a name tag that I can reference from the interceptors int he struts action but I am not sure how to reference the secound box int he action it has no name tag to create a getter for.
 
Jesus Mireles
Ranch Hand
Posts: 122
Mac IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So why dont you put a name attribute?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!