Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Populating subsequent select boxes with DWR

 
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:

 
Self destruct mode activated. Instructions for deactivation encoded in this tiny ad.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic