Issue
Recently an issue was found working with ADF tabs. A panelTabbed component was added to a page with 'n' tabs, each of them had its own showDetailItem. The way this ADF component works is explained in this link; roughly speaking, there is a disclosed attribute in every tab where developer specifies when its content will be displayed. For instance:
<af:panelTabbed childCreation="lazyUncached" id="pt2">
<af:showDetailItem text="Tab1"
id="sdi2"
disclosureListener="#{pageFlowScope.utilBean.navigateToNode}"
disclosed="#{navigationContext.currentNavigationModel.currentSelection.attributes['Target'] eq 'tab1' or param.p eq 'tab1'}"
immediate="true">
<!--Task flow that will be displayed in that tab-->
<af:region value="#{bindings.taskflowTab1.regionModel}"
id="r3"/>
<!-- Navigation path to the tab, as it is defined in default-navigation-model.xml file-->
<f:attribute name="destination"
value="app1/myTabPage/tab1"/>
</af:showDetailItem>
<!--Other tabs here-->
</af:panelTabbed>
Tabs are accessed via:
- URL: Introducing an URL specifying the tab parameter, i.e. http://localhost:7101app1/faces/oracle/webcenter/portalapp/pages/myTabPage.jspx?p=tab1
- Click: Just clicking on the tab.
If a tab is clicked, then URL links to other tabs stop working properly. For instance, if tab number 4 is clicked, then URL links to tabs after number 4 stop working.
A Service Request was registered in Oracle Support and a tes case was provided. Pascal B., an experienced WebCenter Portal engineer, was able to reproduce the issue and found the cause:
It is an issue related to persistence storage. When a tab is clicked, the persistence for the selected tab is not set and the issue appears.
Solution
A workaround was provided which successfully solved the problem. By overriding the default ComposerChangeManager class to avoid persistence problems. Steps:
1. Create a java class to overwrite the default ComposerChangeManage: PortalComposerChangeManager.java
2. Set this custom ComposerChangeManager as default composer manager in the web.xml file:
Comment out the following
<!--
<context-param>
<param-name>org.apache.myfaces.trinidad.CHANGE_PERSISTENCE</param-name>
<param-value>oracle.adf.view.page.editor.change.ComposerChangeManager</param-value>
</context-param>
-->
Add the following:
<context-param>
<param-name>org.apache.myfaces.trinidad.CHANGE_PERSISTENCE</param-name>
<param-value>oracle.webcenter.portalapp.override.PortalComposerChangeManager</param-value>
</context-param>
3. Save all, deploy and test the application.
NOTE: As requested, here you may download a Tabs Sample Application where this issue is reproduced, and the same application where the issue is solved using the workaround.
References
PortalComposerChangeManager.java
ShowDetailItem Documentation
Oracle Service Request: SR 3-9372590301: ADF panelTabbed Navigation issue with WebCenter Portal
Bug 19265590 : ADF PANELTABBED NAVIGATION ISSUE WITH WEBCENTER PORTAL