• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Valuechangelistener f:selectitems

 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am coding a requirement where a valuechange listener triggers the population of a UIselectitems component. Here is my code:
JSF page:


Backing bean:


Valuechangelistener:


I am unable to populate the component.

 
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I hope you are trying to populate Pnsis values with the valuechangelistener.

1) Is the listener called?
2) getPnsis() seems to be returning a default ArrayList. This is the method that will be called when the pnsis dropdown is rendered. you should have code here that binds the value to the data returned from the listener method.
 
Gina vernon
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sridhar Santhanakrishnan wrote:I hope you are trying to populate Pnsis values with the valuechangelistener.

1) Is the listener called?
2) getPnsis() seems to be returning a default ArrayList. This is the method that will be called when the pnsis dropdown is rendered. you should have code here that binds the value to the data returned from the listener method.



Sridhar,
1) I provided a valuechangelistener tag in the jsp as a child of the triggering component.
2) I am not sure how to accomplish your second suggestion. The listener method does not return anything. The method is triggered automatically when the parent component's value changes so why or how can it be called explicitly from getPnsis()? Some sample code would be helpful.

Thanks.
 
Gina vernon
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I should also mention that I tried using a text box instead of UIselectitems and it worked. And the backing bean setup was the same.
Its just the selectitems that doesn't work.
 
reply
    Bookmark Topic Watch Topic
  • New Topic