aspose file tools*
The moose likes JSF and the fly likes Using ValueChangeListeners with Datatable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Using ValueChangeListeners with Datatable" Watch "Using ValueChangeListeners with Datatable" New topic
Author

Using ValueChangeListeners with Datatable

Aravind Elango
Greenhorn

Joined: Jun 02, 2003
Posts: 20
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using ValueChangeListeners with Datatable