Adf table with checkbox refreshing data binding problem
761373Jun 5 2012 — edited Jun 5 2012Hello.
I use JDeveloper 11.1.1.3. I need to use table with checkboxes in each table row in my project. I use VO with transient attribute "Selected" which has a boolean type.
All works well, expect one thing:
when you click checbox with valueChangeListener and try to get selected row in managedBean you will get no selected rows. After selecting second row maaged bean ill show that only 1 row is selected. This is my method from managedBean:
public void SelectCountyClick(ValueChangeEvent valueChangeEvent) {
DCIteratorBinding it = ADFUtils.findIterator(ITERATOR_NAME);
int selectedRowCount = 0;
RowSetIterator rit = it.getRowSetIterator();
Row r = rit.first();
if (r != null) {
if ((Boolean)r.getAttribute("Selected"))
selectedRowCount++;
}
while (rit.hasNext()) {
r = rit.next();
if ((Boolean)r.getAttribute("Selected"))
selectedRowCount++;
}
System.out.println("Selected ALL ROWS : " + selectedRowCount);
}
I tryed to change this event to client event, i got row number, i set "true" or "false" to databinding by code, but all times i cant get correct data after value change event.
Please help me.
The last idea is updating databing after checkbox click i think. Please help me.
Thank you!