*
The moose likes Struts and the fly likes Retrieving different values in seperate dropdown fbox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Retrieving different values in seperate dropdown fbox" Watch "Retrieving different values in seperate dropdown fbox" New topic
Author

Retrieving different values in seperate dropdown fbox

Sege Stephen
Ranch Hand

Joined: Oct 06, 2007
Posts: 51
Hi, I have in my jsp




I am getting some list from the database and I am setting them in my action class. I have two different queries I am running, I want the result of query A to be displayed in list options in Dropdown 1 box and result of query B to be displayed in the list options in Dropdown 2.

What I am getting is the results of both queries are population both dropdowns. How do I specify the dropdown I want a query to be inserted into?

To recap, I am getting the result of two queries in both downdown list, I want the result in seperate list for each query. Ie if the result of query 1 is a,b,c and 2 is d,f,g. I am getting in each dropdown a,b,c,d,f,g.

This is where how I am setting the values

Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Just make two separate lists (e.g. keys1 and keys2) and base the first dropdown on one, and the second dropdown on the other.


Merrill
Consultant, Sima Solutions
selvaraju sellamuthu
Ranch Hand

Joined: Jun 28, 2007
Posts: 53
Your problem is in JSP. clearly check your code for bean's two lists value declarations.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Retrieving different values in seperate dropdown fbox