Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Populating subsequent select boxes with DWR

 
Fletcher Munson
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm want to use DWR (on a struts 2 page) to populate multiple select lists subsequently (about 5 times), but I can't figure out how to do it. The initial list is populated from the with values from the application context when the page loads - this isn't a problem. I select a value from this list, and my second list gets populated (works well). I select a value from the second list, and this is where I have the problem - there aren't any values in the parameter being passed in. I can get an alert to give me something "meaningful" from param, param.id, param.name, but not param.value (this is undefined). Upon further investigation (viewing the source of the webpage) I notice the select list isn't being populated, but I can see fresh values in the dropdown on the UI every time. I'm not really sure what I'm doing wrong, or even if I AM doing something wrong. In the end I need to have all the ids selected from each select box so I can save the data. My code is below if anyone can point me in the right direction. Thanks in advance.

This is included in another JSP page:



This is the main JSP:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic