ADF Pivot Table
Last week I was helping a customer improve the looks of their Pivot Table. They had a couple of questions that took me sometime to investigate and get to a final answer.
Question #1 Is it possible to insert a link in the table header value? Can I stamp another pivot table cell on the same goLink?
Answer Yes, it is possible. The headerCell tag plus a switcher will do the job of stamping the goLink to a specific cell, in this case city. However, there’s no built-in EL syntax to reference other pivot table cells, therefore I took the approach of using oracle.adf.view.faces.bi.model.DataModel and oracle.dss.util.DataAccess to look up values in other cell inside a managed bean (line 12).
Code Snippets
Question #2 Can we display the titles for the categories? For instance, on the picture below, right above 2007 and Tents, it should display Time and Product. Currently, it only happens when the user hovers over its mouse.
Answer Unfortunately, this feature is currently not implemented. If you are reading this post and also has the same need, please leave a comment below detailing your requirement.

Question #1 Is it possible to insert a link in the table header value? Can I stamp another pivot table cell on the same goLink?
Answer Yes, it is possible. The headerCell tag plus a switcher will do the job of stamping the goLink to a specific cell, in this case city. However, there’s no built-in EL syntax to reference other pivot table cells, therefore I took the approach of using oracle.adf.view.faces.bi.model.DataModel and oracle.dss.util.DataAccess to look up values in other cell inside a managed bean (line 12).
Code Snippets
1: <dvt:pivotTable id="pivotTable1"2: value="#{bindings.PlaceholderDataType.pivotTableModel}"3: styleClass="width:100%;" var="cellData"4: varStatus="cellStatus" binding="#{pageFlowScope.ptBean.pt}">5: <dvt:headerCell>6: <af:switcher facetName="#{cellData.layerName}"7: defaultFacet="Default" id="s1">8: <f:facet name="city">9: <af:group id="g1">10: <af:goLink text="#{cellData.label}" id="gl1"11: targetFrame="_blank"12: destination="#{pageFlowScope.ptBean.findURL[cellData.label]}"/>13: </af:group>14: </f:facet>15: <f:facet name="Default">16: <af:outputText value="#{cellData.label}" id="ot2"/>17: </f:facet>18: </af:switcher>19: </dvt:headerCell>20: </dvt:pivotTable>
1: import oracle.adf.view.faces.bi.component.pivotTable.UIPivotTable; 2: import oracle.adf.view.faces.bi.model.DataModel; 3: import oracle.dss.util.DataAccess; 4: import oracle.dss.util.DataMap; 5: 6: private UIPivotTable pivotTable; 7: ... 8: DataModel dm = pivotTable.getDataModel(); 9: DataAccess da = dm.getDataAccess(); 10: ... 11: List myList = (List)da.getValue(2, 1, DataMap.DATA_AGGREGATES); 12: ...
Question #2 Can we display the titles for the categories? For instance, on the picture below, right above 2007 and Tents, it should display Time and Product. Currently, it only happens when the user hovers over its mouse.
Answer Unfortunately, this feature is currently not implemented. If you are reading this post and also has the same need, please leave a comment below detailing your requirement.
RSS
Email