Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Retrieving different values in seperate dropdown fbox

 
Sege Stephen
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just make two separate lists (e.g. keys1 and keys2) and base the first dropdown on one, and the second dropdown on the other.
 
selvaraju sellamuthu
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your problem is in JSP. clearly check your code for bean's two lists value declarations.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic