Refreshing a Specific Cell in dvt:pivotTable
The following code snippet may help you to partial refresh a specific cell in dvt:pivotTable component (Thanks Chadwick Chow for this tip)
UIPivotTable pt = getUIPivotTable();
CellIndex current = pt.getCellIndex();
try {
// Get desired Data Cell
DataCellIndex index = new DataCellIndex(2, 0);
// sets currency
pt.setCellIndex(index);
// ppr the cell
RequestContext.getCurrentInstance().addPartialTarget(pt.getCellComponent());
} finally {
// restore currency
pt.setCellIndex(current);
}
I am using this code in bean using valuechangeevent of the cell of the pivot table. But cell data is not refreshing, its changing back to its original value in the pivot table. Can you please help?
ReplyDelete