jueves, 26 de noviembre de 2015

WCP 12.2.1: Alta Top Navigation Template BUG

There is a BUG in the Alta UI Template provided with Oracle WebCenter Portal 12.2.1

When editing a Page of a Portal which is using Alta Template an incident will raise in your log file

<Warning> <oracle.adfinternal.view.faces.taglib.util.TagUtils> <ADF_FACES-30120> <More than one af:skipLinkTarget found: T:wcCont, T:cpt11:container. Only one af:skipLinkTarget is allowed per page.>
<Error> <oracle.adf.controller.internal.binding.TaskFlowRegionModelViewPort> <ADFC-64010> <ADFc: Page '/oracle/webcenter/page/scopedMD/s72cbbca4_98aa_454f_8362_f9da775ce41c/Page3fff015d_3303_40c0_b4cb_b69fa20bc7dc.jspx' references task flow binding 'portaltopnavigation' more than once, which is not supported.  The ids of the components referred are: ' T:cpt11:spnvpnRtl T:cpt11:spnvpn'.>
<Error> <oracle.adf.controller.internal.binding.TaskFlowRegionModelViewPort>
<BEA-000000> <>
<Info> <oracle.dfw.incident> <DFW-40101> <An incident has been signalled with the incident facts: [problemKey=ADFC-00032 [ADFc] incidentSource=SYSTEM incidentTime=Mon Nov 16 16:41:25 GMT 2015 errorMessage=ADFC-32 executionContextId=0059AgKUUSQFw00Fzzw0w00004zB00007k]>
<Warning> <oracle.dfw.incident> <DFW-40125> <incident flood controlled with Problem Key "ADFC-00032 [ADFc]">
<Error> <oracle.adf.controller.internal.binding.TaskFlowRegionModelViewPort> <ADFC-64010> <ADFc: Page '/oracle/webcenter/page/scopedMD/s72cbbca4_98aa_454f_8362_f9da775ce41c/Page3fff015d_3303_40c0_b4cb_b69fa20bc7dc.jspx' references task flow binding 'spacesActionSubmenu' more than once, which is not supported.  The ids of the components referred are: ' T:cpt11:actnRegionRtl T:cpt11:actnRegion'.>
<Error> <oracle.adf.controller.internal.binding.TaskFlowRegionModelViewPort> <BEA-000000> <>
<Info> <oracle.dfw.incident> <DFW-40101> <An incident has been signalled with the incident facts: [problemKey=ADFC-00032 [ADFc] incidentSource=SYSTEM incidentTime=Mon Nov 16 16:41:25 GMT 2015 errorMessage=ADFC-32 executionContextId=0059AgKUUSQFw00Fzzw0w00004zB00007k]>
<Warning> <oracle.dfw.incident> <DFW-40125> <incident flood controlled with Problem Key "ADFC-00032 [ADFc]">
<Warning> <oracle.adfinternal.view.page.editor.renderkit.PageCustomizableRenderer> <BEA-000000> <A facet named  declared by the toolbarLayout attribute was not found in page /oracle/webcenter/page/scopedMD/s72cbbca4_98aa_454f_8362_f9da775ce41c/Page3fff015d_3303_40c0_b4cb_b69fa20bc7dc.jspx.>



Why does it happen?

If you create a copy of the Alta UI Top Navigation you will find the following snippet of code:

<af:switcher facetName="#{requestContext.rightToLeft? 'rtl' : 'ltr'}">
<f:facet name="ltr">
 <af:panelGroupLayout id="navPanel" layout="vertical" styleClass="WCPortalFixedWidth">
    <af:region id="spnvpn" inlineStyle="margin-right:45px;" value="#{bindings.portaltopnavigation.regionModel}"/>
    <af:panelGroupLayout id="pglbl" inlineStyle="position:absolute;top:0px;right:0px;margin-top:3px;" layout="vertical">
       <af:button clientComponent="true" disabled="#{portalToolbarContext.portalToolbar.editMode}" icon="#{requestContext.rightToLeft ? '/adf/webcenter/agentdropdown_rtl_sm_ena.png' : '/adf/webcenter/agentdropdown_sm_ena.png'}" id="actionsMenuLink" rendered="#{!serviceCtx.scope.spaceTemplate and (WCAppContext.currentScope.default ? ((!AdminConfig.fusionAppsMode and security.homeSpaceEnabled) or security.webCenterAdministrator): empty pageFlowScope.contextActionsTaskFlow)}" shortDesc="#{uib_o_w_w_r_WebCenter['NAV_TOOLS_ACTIONS_FOLDER.DESCRIPTION']}" styleClass="WCActionsButton">
          <af:showPopupBehavior align="afterStart" alignId="actionsMenuLink" popupId="actnRegion:actionsDropdownPopup"/>
       </af:button>
       <af:region id="actnRegion" rendered="#{!serviceCtx.scope.spaceTemplate and (WCAppContext.currentScope.default ? ((!AdminConfig.fusionAppsMode and security.homeSpaceEnabled) or security.webCenterAdministrator): true)}" value="#{bindings.spacesActionSubmenu.regionModel}"/>
    </af:panelGroupLayout>
 </af:panelGroupLayout>
</f:facet>
<f:facet name="rtl">
 <af:panelGroupLayout id="navPanelRtl" layout="vertical" styleClass="WCPortalFixedWidth">
    <af:panelGroupLayout id="pglblRtl" inlineStyle="position:absolute;top:0px;left:0px;margin-top:3px;" layout="vertical">
       <af:button clientComponent="true" icon="#{requestContext.rightToLeft ? '/adf/webcenter/agentdropdown_rtl_sm_ena.png' : '/adf/webcenter/agentdropdown_sm_ena.png'}" id="actionsMenuLinkRtl" rendered="#{!serviceCtx.scope.spaceTemplate and (WCAppContext.currentScope.default ? ((!AdminConfig.fusionAppsMode and security.homeSpaceEnabled) or security.webCenterAdministrator): empty pageFlowScope.contextActionsTaskFlow)}" shortDesc="#{uib_o_w_w_r_WebCenter['NAV_TOOLS_ACTIONS_FOLDER.DESCRIPTION']}" styleClass="WCActionsButton">
          <af:showPopupBehavior align="afterStart" alignId="actionsMenuLinkRtl" popupId="actnRegionRtl:actionsDropdownPopup"/>
       </af:button>
       <af:region id="actnRegionRtl" rendered="#{!serviceCtx.scope.spaceTemplate and (WCAppContext.currentScope.default ? ((!AdminConfig.fusionAppsMode and security.homeSpaceEnabled) or security.webCenterAdministrator): true)}" value="#{bindings.spacesActionSubmenu.regionModel}"/>
    </af:panelGroupLayout>
    <af:region id="spnvpnRtl" inlineStyle="margin-left:45px;" value="#{bindings.portaltopnavigation.regionModel}"/>
 </af:panelGroupLayout>
</f:facet>
</af:switcher>


The rendered expression evaluates to true when you are Editing the page and it will produce the Incident of the duplication.

A bug fixing will come in future bundle patch. Alternatively you can create a copy of the Template and fix it manually.

4 comentarios:

  1. Hi Daniel,
    I am sorry to hijack this post but since you are customizing webcenter portal assets so I would like to ask my question here.
    I am looking for a way of adding custom filters in a webcenter 12.2.1 application.
    Can you share with me on how it is done? A blog post would certainly help newbies like us.
    I am looking to intercept certain request for pages in my webcenter portal application.
    I also would like to add a no-cache filter but I just dont know how this is done in a standard way.
    Thanks

    ResponderEliminar
    Respuestas
    1. Hello Mark.

      In 11g version was possible (I wrote in my corporate blog about this http://blog.vassit.co.uk/knowledge/managing-web-xml-in-webcenter-portal-previously-webcenter-spaces):
      - from 11.1.1.2 to 11.1.1.7 Using DesignWebCenterSpaces for deploying the shared-lib with a web.xml file registering your filters
      - 11.1.1.8 and 11.1.1.9 Using PortalServerExtension for deploying the shared-lib with a web.xml file registering your filters.

      However, in 12c, Oracle does not recommend the use of custom Servlet/Filter as it can produce issues or errors to the OOTB functionality. (http://www.oracle.com/technetwork/middleware/webcenter/migratingwcpframeworkapps-1-2595850.pdf)

      I did not try using the PortalServerExtension to try to deploy a Servlet or Filter in 12.2.1 yet. Try to add the web.xml descriptor file with your mapping to the extend.spaces.webapp.war shared-lib.

      My suggestion is to follow Oracle practices and try to avoid writing your custom Filter.

      Now focusing your requirements:
      - If you need some pages to have no-cache then you can create your own Page Style with attributes to administer if the page should render the following snippet of code in the metaContainer facet of the af:document:
      <af:document...>
      <f:facet name="metaContainer">
      <f:verbatim>
      <meta http-equiv="Cache-Control" content="no-store"/>
      <meta http-equiv="Pragma" content="no-cache"/>
      </f:verbatim>
      </f:facet>
      </af:document>

      Also if you need to execute java code when the page is loading you can consider adding a af:clientListener + af:serverListener in your af:document to fire an ADF Event who calls a Java Class.

      I hope this information helps you. Try the option of the metaContainer facet of the af:document.

      Eliminar
  2. Hi Daniel,
    I'm having the same problem with version 12.1.3. Can you please provide more information on how to create a copy of the Template and apply it to the application?
    Thanks

    ResponderEliminar
    Respuestas
    1. Hi and sorry for the delayed answer. WebCenter does not exists in 12.1.3 :)

      I just created a JDeveloper Page Template.
      Created a copy of Alta Top Navigation Template in WebCenter Administration Console.
      Edit the Copy for copy and pasted the source dode and pagedef to my JDeveloper. I just created a duplicate binding for the Task Flow. (I have two different bindings for the same task flow) and then fixed the duplication.

      Anyway this is fixed for 12.2.1.2 :)

      Kind regards.

      Eliminar