This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Populating subsequent select boxes with DWR Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Populating subsequent select boxes with DWR" Watch "Populating subsequent select boxes with DWR" New topic
Author

Populating subsequent select boxes with DWR

Fletcher Munson
Ranch Hand

Joined: May 16, 2007
Posts: 31
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:



SCJP 5, SCWCD 1.4
 
GeeCON Prague 2014
 
subject: Populating subsequent select boxes with DWR