My Oracle Support Banner

NullPointerException When Wrapping a Dynamic Table Component Into a panelCollection (Doc ID 1361329.1)

Last updated on FEBRUARY 03, 2019

Applies to:

Oracle JDeveloper - Version: 11.1.2.0.0 and later   [Release: Oracle11g and later ]
Information in this document applies to any platform.

Symptoms


You are trying to use ADF Faces Dynamic Table components (dynamic:table) together with an af:panelCollection:
...
<af:document title="dynamicTable-panelCollection.jspx" id="d1">
    <af:messages id="m1"/>
    <af:form id="f1">
        <af:panelCollection id="pc1">
            <f:facet name="menus"/>
            <f:facet name="toolbar"/>
            <f:facet name="statusbar"/>
            <dynamic:table value="#{bindings.TestTableDataTypeIterator}" id="t2"/>
...

If you wrap the dynamic table in a panelCollection, you get a NullPointerException when running the page:
...
<LifecycleImpl>
<_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase RENDER_RESPONSE 6
java.lang.NullPointerException
  at oracle.adfinternal.view.faces.renderkit.rich.PanelCollectionRenderer$PanelCollectionHelper._isTopBarShown(PanelCollectionRenderer.java:1391)
  at oracle.adfinternal.view.faces.renderkit.rich.PanelCollectionRenderer$PanelCollectionHelper._createCompositeComponents(PanelCollectionRenderer.java:1339)
  at oracle.adfinternal.view.faces.renderkit.rich.PanelCollectionRenderer$PanelCollectionHelper.<init>(PanelCollectionRenderer.java:671)
  at oracle.adfinternal.view.faces.renderkit.rich.PanelCollectionRenderer$PanelCollectionHelper.<init>(PanelCollectionRenderer.java:616)
  at oracle.adfinternal.view.faces.renderkit.rich.PanelCollectionRenderer.encodeAll(PanelCollectionRenderer.java:445)
  at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
  at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:493)
  at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:913)
  at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
...


There is no problem when using a standard ADF Faces Table component wrapped in a panelCollection:...
<af:panelCollection id="pc1">
    <f:facet name="menus"/>
    <f:facet name="toolbar"/>
    <f:facet name="statusbar"/>
    <af:table value="#{bindings.TestTableDataType.collectionModel}" var="row"
        ... id="t1">
        <af:column sortProperty="#{bindings.TestTableDataType.hints.FirstName.name}" filterable="true"
            ... id="c1">
            <af:outputText value="#{row.FirstName}" id="ot1"/>
        </af:column>
...


Same when the page contains an ADF Faces Dynamic Table component without panelCollection:
...
<af:document title="test2-dyntable.jspx" id="d1">
    <af:messages id="m1"/>
    <af:form id="f1">
        <dynamic:table value="#{bindings.TestTableDataTypeIterator}" id="t2"/>
...

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
  Symptoms
  Cause
  Solution
  References

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.