File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Passing field information Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Passing field information " Watch "Passing field information " New topic
Author

Passing field information

Harrry Singh
Greenhorn

Joined: Mar 13, 2012
Posts: 4
Hi All,

I'm using Struts 1.3.5 and basically stuck at how to pass information between action method, JSP pages etc.

Basically I've a collection of objects that I would like to display using drop down box. So for that I use



The collection 'location' consists of objects of class 'Location' and the class Location has three fields location code, location name, location type. So using above I can pass on location code & location name, but I also want to pass the selected location 'location type' as well. How do I do this?

Various options I tried are :

1. Passing on Selected 'Location' as a object. But doesn't work
2. Passing on location code as HIdden field inside HTML:Select. But this also doesn't work and I never get to pass the value.

Any ideas or best way to do it.

Thanks in advance.



 
 
subject: Passing field information
 
Similar Threads
Validation of Selects (Heeelp!)
Problem with html:optionsCollection
Displaying Data From Different Tables in .jsp
How to populate a drop down box built with Struts html tag dynamically with the iterator
Problem with dropdown list