I am using Primefaces 3.5 with jsf 2.0. I have a datatable that has a column with autocomplete component with multiple = "true"
in all rows. The datatable has checkbox in each row for row selection. There is one more autocomplete component outside the table(calling it group component). Whenever the value in group component change, the same value should appear in all the autocomplete comonents in the selected rows of the table.
For this, I want to change the value of autocomplete components inside table in client side only.
The two problems I am facing:
1.How to set/get value of autocomplete components in javascript when multiple="true"
? I am able to set/get when mulitple="false"
using $(autocomplete).input.val();
But not able to find when mulitple = "true"
UPDATE: I found to get values when mulitple ="true"
using $(autocomplete).hinput.val()
. But I still couldn't find how to set the values.
2 How to change the ui appearance of autocomplete function when multiple = "true". I have limited space in table. So I want to show all values separated by comma. Currently if width is fixed, the value comes vertically. This increases the height of the row which makes table look ugly.