• 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

Using ValueChangeListeners with Datatable

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic