• Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing values from JSP to JS

 
Naresh Bafna
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a requirement where I retrieve some tree node kind of data from the back end which I need to display in my jsp as three lists. If i select any one item in the first list then the second list should be populated with the child's of the first list. I am stuck with the display part where I do not know how to populate the second list with the list retrieved from backend present in the JSP.
If any one can guide me as to where I should look for or what i need to to it would be helpful.

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you know the values up front, you can create JavaScript constructs to hold the data. If the data can't be known until after selection, then you'll either need to resubmit and repaint the page, or use Ajax to retrieve the information from the server without a page refresh.
 
Naresh Bafna
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, they are not pre-populated. I will use AJAX to do it. Thanks Bear
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!