Forum Stats

  • 3,838,724 Users
  • 2,262,395 Discussions
  • 7,900,739 Comments

Discussions

ADF af:panelSplitter binding in threeColumnTemplate NullPointerException

690077
690077 Member Posts: 17
edited Sep 2, 2009 12:42PM in JDeveloper and ADF
Oracle Fusion ADF - Accessing ADF af:panelSplitter binding in threeColumnTemplate NullPointerException

Hi,
when using the template containing panel splitter binding to backing bean panelSpliterRightShoppingCart a RichPanelSplitter,
when clicking on a command button, the action throws a NullPointerException. Any ideas as to why the component is NULL on
a fully rendered page? I want to be able to set the collapsed attribute to true or false and of course see that state in the browser view, Thanks...

<af:panelSplitter collapsed="false" binding="#{backingBeanScope.backing_jsp_myDetails.panelSpliterRightShoppingCart}"
orientation="horizontal"
splitterPosition="#{attrs.endColumnSize}"
positionedFromEnd="true" id="panelSpliterRightCart">
<f:facet name="first">
<!-- start of main decoration -->
<af:decorativeBox theme="default" id="pt_db2">
<f:facet name="center">
<af:facetRef facetName="center"/>
</f:facet>
</af:decorativeBox>
<!-- end of main decoration -->
</f:facet>
<f:facet name="second">
<af:facetRef facetName="end"/>
</f:facet>
</af:panelSplitter>

Edited by: meet.mrnrg on Sep 1, 2009 12:05 PM
Tagged:

Answers

  • 452071
    452071 Member Posts: 443
    Usually when the page breaks like that is because you have a problem on either one of the EL in your page or some of the business logic that you invoke is throwing the NPE. Can you output some of the debugging information from your log file so we can have more lights on what's going on?

    thanks,

    Juan Camilo
  • 690077
    690077 Member Posts: 17
    Yes - the problem is with the current limitations on the level of EL expression language capabilities on the EL expression enabled attributes of various tags.

    1) The Oracle Fusion Expression - BUILDER - currently only allows the following operations;
    #{&&} #{||} #{>} #{<} #{>=} #{<=} #{==} #{!=} #{-} #{!} #{+} #{-} #{*} #{} #{%}

    2) The Oracle Fusion Expression - BUILDER - currently DOES NOT allow;
    a) access to public methods
    b) access to public methods of any return type
    c) access to public methods with any parameter lists

    -- My Problem --
    <af:pageTemplate viewId="/templates/threeColumnTemplate.jspx"> -- This is the template with the following;
    The code:
    af:panelSplitter collapsed="false" binding="#{backingBeanScope.backing_jsp_myDetails.panelSpliterRightShoppingCart}"

    a) This binding attribute as a valid EL expression, the page compiles with no-errors.
    b) The backing bean and the field attribute exist
    c) The filed attribute of type RichPanelSplitter - it has setter and getter methods.
    d) The code: The if check removes the NullPointerException, but does not explain why the field data member is not populated, it show not be NULL, all other Richxxx types are populated with valid page object references.
    public void collapseExpandRightCartPanelSplitter() {
    System.out.println("collapseExpandRightCartPanelSplitter: " + "collapseExpandRightCartPanelSplitter()");
    System.out.println("panelSpliterRightShoppingCart: " + panelSpliterRightShoppingCart);
    if (this.panelSpliterRightShoppingCart != null) { //Removes NullPointerException
    if (this.panelSpliterRightShoppingCart.isRendered()) {
    this.panelSpliterRightShoppingCart.setCollapsed(false);
    } else {
    this.panelSpliterRightShoppingCart.setCollapsed(true);
    }
    }
    }
    e) The main JSPX page calls the template and has a RichCommandButton - this button has an action which invokes the collapseExpandRightCartPanelSplitter() method in the backing bean! But of course as mentioned the field data member is not populated and is always NULL for some reason!
This discussion has been closed.