• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Change values in dropdown dynamically

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I've two dropdowns on my jsf page.
I want to change the values of second one based on the value selected in the first. So once the user selects some values in dropdown 1 the values in dropdown 2 should be refetched.
How to do this?
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should be able to achieve this w/ PartialTriggers (FYI, I use Apache Trinidad). Here is a snippet of my JSF code:

First ListBox:


Second ListBox:


Notice the second listbox: I have the partialTriggers attribute set to the id of the first listbox and in the backing bean whenever the user selects a value in the first listbox, this valuechange is captured and sent to populate the second box.

Hope this helps.
 
Tick check! Okay, I guess that was just an itch. Oh wait! Just a tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic