Skip to main content

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);  
 }  

Comments

Darshan Punjabi said…
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?
Akshay said…
refresh your iterator cache.

DCIteratorBinding binding = RmsUIUtils.findIterator("PoDiffMatrixVOIterator");
binding.invalidateCache();

Popular posts from this blog

How to set Bind Variable Values at runtime ?

In this post I'm sharing a couple of approaches for programmatically setting bind variables values at run time. This post is an attempt to explain 'When to use what ?'[ In case if you are familiar with 'Bind Variables' in ADF BC, please refer Section 5.10, Working with Bind Variables in Fusion Developer's Guide ]

1. Set the Bind Variable value using RowSet::setNamedWhereClauseParam(...)

You can use use the setNamedWhereClauseParam(...) method on the ViewObject interface (which extends oracle.jbo.RowSet) to set the value for bind variables. Please note this sets the value on default RowSet. In other words, this doesn't have any effect on the secondary RowSets that you/system generates.
ViewObject vo = am.findViewObject("EmployeesView1"); vo.setNamedWhereClauseParam("bindVarDeptId", new Number(10)); vo.executeQuery();
2. Set the Bind Variable value using ViewObject's VariableValueManager::setVariableValue(...)

VariableValueManager Ma…

Happy New Year 2018 !

We can't go back and change the beginning, but we always can start where we are and change the ending. Believe in yourself and you will be unstoppable!

Wishing you and your family a very happy new year 2018 !!!