• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Valuechangelistener f:selectitems

 
Gina vernon
Ranch Hand
Posts: 108
  • 0
  • Mark post as helpful
  • send pies
  • 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.

 
Sridhar Santhanakrishnan
Ranch Hand
Posts: 317
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic