• 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
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

selectManyListbox

 
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 have been trying this for a long time now,but unable to get the solution.
My question is I have two selectManyListboxes,In one of the selectManyListbox I have some values on selecting multiple values and click a button then I should get the values that exists for the selected items in the second selectManyListbox.
For example I have countries in one listbox and if I select multiple countries then I should get the capitals of that countries in second listbox
Please could anybody explain me how to do this I have been trying this for a long time.
Please help me..

Any help is appreciated
 
Ruther Ford
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any help Ranchers
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I would do this in the setter method for the value bound to the first component.

John
[ March 25, 2007: Message edited by: John Bartlett ]
 
Ruther Ford
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi John,
Thanks for your reply,could you please explain me with a piece of code.
It will be very much helpfull for me.
Thanks in advance.

Ruther
 
John Bartlett
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok basically you have your jsf....



In your backing bean then you would have attributes for value, value2, selectItems and selectItems2. (inc getters and setters). To get the first box to update the second you would use the value setter to update the selectItems2 attribute...i.e.



Hope this makes it more clear..?

John
 
roses are red, violets are blue. Some poems rhyme and some are a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic