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

Interdependent dropdown lists

 
Smitha Venkatesh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...
My form contains 2 dropdown lists(1 for companies and other for its locations)that are dynamically generated based on the number of companies entered by user.I am able to get the first list but the problem is in obtaining the second because values of the location list is based on the output of the first list.

thanks in advance,
 
Khushwinder Chahal
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Smitha Venkatesh ,

You need to get all these values in a controller class before going to your jsp page, and then you can display these values in as many list as possible.
I mean to say just retrieve all the information which required for your jsp page before going to that jsp page and set their values in your controllers.
Regards,
 
Smitha Venkatesh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Khushwinder,
i am following the same method,getting all the values of locations in a list in business logic class then setting the list as session attribute in action class.Its working great for a single company,but i am facing problem for miltiple companies(the same list is displayed for all the companies).I am not able to display multiple lists in jsp.
thanks,
 
Khushwinder Chahal
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Smitha

Pleas elaborate your query little bit more.
I think you need to use javascript for that purpose.
Explain you query a bit more.

Regards,
 
Smitha Venkatesh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got it... there was some mistake while looping in jsp..
thanks a lot..
 
Harshawardhan Deshpande
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Smitha,

Can you post back the solution you got? or the code-snippet you wrote.
It would be of great help.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic