Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using ValueChangeListeners with Datatable

 
Aravind Elango
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a datatable with 2 columns and a number of rows. The first column contains a selectone listbox and the next column contains a textbox. My objective is to select an option from the drop down list and to get the selected value to show up on the textbox(Only in that purticular row).

I tried to do this by attaching an ValueChangeListener to the selectBox. I expected the valueChangeListener function to be called once. Instead, it gets called once for every row in the datatable.


Some Background Info:
----------------------
SampleBean is a request scope managed bean
SampleBean's attribute is an arry of TableBean (i.e. TableBean[])
TableBean contains 2 attributes: An SelectItem[] and a String.
Thus, each row in the datatable corresponds to one TableBean.
I tried having the valueChangeListener() placed in both the SampleBean and the TableBean, but still have the same problem of multiple calls.


Any/All help would be greatly appreciated.

Thanks,
Aravind
Thanks,
Aravind
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic