ADF Pivot Table

George Maggessy | Jul 27, 2010 16:33 +0000
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
   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.


Capture 

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.

Another undocumented tag on WebCenter Spaces

George Maggessy | Jul 21, 2010 17:52 +0000
If you've ever downloaded the Spaces Customization project from OTN, you might have tested it choosing myskin as the default application skin and SampleSiteTemplate as the default template for Group Spaces and Personal Spaces. When doing so and selecting a specific user, I’ll use monty for this post, you'll see a tab with monty's Profile Gallery and a panel box entitled Pages on the left with links to monty's Profile Gallery pages.

monty_gallery
Monty's Profile Gallery
Once you navigate to vicky's Profile Galery, the panel box title still says Pages and shows the same list of pages, nevertheless the links point to vicky's Profile Galery. It turns the navigation through profiles a bit confusing. Notice also that I haven't signed out from monty’s account. I was only viewing vicky's profile page.
 monty_gallery_vicky
Switching to vicky's Profile Gallery

vicky_gallery
Vicky's Profile Gallery
The easiest solution, and the one also requested by a customer was to replace the title Pages by <User>'s Gallery. It can be easily achieved by using the following EL:
<af:panelBox text="#{o_w_w_i_v_b_resourceViewerBean.userDisplayName}'s Gallery" showDisclosure="false">
...
</af:panelBox>


That's how it should look now:

pic3

Vicky's Gallery

Hope this helps in the future.

Temporary Post Used For Theme Detection (8a8ae72c-6e2c-4d6a-894b-d7132d45fdb0 – 3bfe001a-32de-4114-a6b4-4005b770f6d7)

George Maggessy | Jul 20, 2010 12:40 +0000

This is a temporary post that was not deleted. Please delete this manually. (7ed062fa-59e8-4555-a108-06320525ecbf - 3bfe001a-32de-4114-a6b4-4005b770f6d7)