ICEfaces
  1. ICEfaces
  2. ICE-8834

NPE thrown in CommandLinkRenderer.getJavascriptHiddenFieldSetters()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-1.8.2.GA_P05
    • Fix Version/s: EE-1.8.2.GA_P06
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All
    • Salesforce Case Reference:
    • Workaround Exists:
      Yes
    • Workaround Description:
      Initialize the param value to a non-null value.

      Description

      If null is returned for a f:param value in an ice:commandLink, a NPE is thrown. This due to the changes made in ICE-8415.

      Caused by: java.lang.NullPointerException
      at com.icesoft.faces.renderkit.dom_html_basic.CommandLinkRenderer.getJavascriptHiddenFieldSetters(CommandLinkRenderer.java:210)
      at com.icesoft.faces.component.ext.renderkit.CommandLinkRenderer.getJavaScriptOnClickString(CommandLinkRenderer.java:87)
      at com.icesoft.faces.component.ext.renderkit.CommandLinkRenderer.renderOnClick(CommandLinkRenderer.java:69)
      at com.icesoft.faces.renderkit.dom_html_basic.CommandLinkRenderer.encodeBegin(CommandLinkRenderer.java:121)
      at com.icesoft.faces.component.ext.renderkit.CommandLinkRenderer.encodeBegin(CommandLinkRenderer.java:50)
      at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:515)
      at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:355)
      at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:364)
      at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:364)
      at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:364)
      at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:364)
      at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:364)
      at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:95)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:527)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:490)
      1. ice-8834.patch
        1 kB
        Deryk Sinotte

        Activity

        Arran Mccullough created issue -
        Hide
        Arran Mccullough added a comment -

        Attached test case that shows issue. Load welcomeICEfaces.iface to see error.

        Show
        Arran Mccullough added a comment - Attached test case that shows issue. Load welcomeICEfaces.iface to see error.
        Arran Mccullough made changes -
        Field Original Value New Value
        Attachment Case11852Example.zip [ 15132 ]
        Attachment Case11852Example.war [ 15133 ]
        Arran Mccullough made changes -
        Salesforce Case Reference 5007000000QWPUDAA5
        Hide
        Subodh Godbole added a comment -

        Some thoughts -

        • It used to work perfectly with EE P04 and this issue got introduced with EE P05.
        • This JIRA is marked with - Workaround Exists: Yes and Workaround Description: Initialize the param value to a non-null value.
        • But I believe for migrating customers from EE P04 to EE P05 (like us), it is not feasible to add null check all over the source code to check and pass non-null value
        • Hence in my opinion this issue makes a kind of showstopper for migration to EE P05
        Show
        Subodh Godbole added a comment - Some thoughts - It used to work perfectly with EE P04 and this issue got introduced with EE P05. This JIRA is marked with - Workaround Exists: Yes and Workaround Description: Initialize the param value to a non-null value. But I believe for migrating customers from EE P04 to EE P05 (like us), it is not feasible to add null check all over the source code to check and pass non-null value Hence in my opinion this issue makes a kind of showstopper for migration to EE P05
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #32865 Wed Dec 19 09:53:11 MST 2012 deryk.sinotte ICE-8834: guard against null f:param values
        Files Changed
        Commit graph MODIFY /icefaces3/branches/icefaces-3.0.x-maintenance/icefaces/compat/core/src/main/java/com/icesoft/faces/renderkit/dom_html_basic/CommandLinkRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #32866 Wed Dec 19 09:53:46 MST 2012 deryk.sinotte ICE-8834: guard against null f:param values
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/CommandLinkRenderer.java
        Ken Fyten made changes -
        Fix Version/s EE-1.8.2.GA_P06 [ 10470 ]
        Ken Fyten made changes -
        Assignee Deryk Sinotte [ deryk.sinotte ]
        Hide
        Deryk Sinotte added a comment -

        Apologies. This issue was already noted and fixed as per ICE-8749 but the fix was only applied to the ICEfaces 3 trunk. I've applied the relevant fix to the 1.8 and 3.0 maintenance streams now and attached a patch to this case.

        Show
        Deryk Sinotte added a comment - Apologies. This issue was already noted and fixed as per ICE-8749 but the fix was only applied to the ICEfaces 3 trunk. I've applied the relevant fix to the 1.8 and 3.0 maintenance streams now and attached a patch to this case.
        Deryk Sinotte made changes -
        Attachment ice-8834.patch [ 15188 ]
        Deryk Sinotte made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Carmen Cristurean added a comment -

        Verified fix in IE6/7/8/9/FF18/Chrome24 with ICEfaces EE-1.8.GA Build1.

        Show
        Carmen Cristurean added a comment - Verified fix in IE6/7/8/9/FF18/Chrome24 with ICEfaces EE-1.8.GA Build1.
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Deryk Sinotte
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: