Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: EE-2.0.0.GA, 2.0.2
-
Fix Version/s: 2.1-Beta, 3.0, EE-2.0.0.GA_P01
-
Component/s: ICE-Components
-
Labels:None
-
Environment:UISeries/PanelSeries
-
Assignee Priority:P1
Description
A NullPointerException is thrown when displaying a page with the following code:
<ice:form id="loginForm" rendered="false">
<ice:panelSeries
value="#{personBean.searchFacetValueLists}" var="sfvl"
rendered="#{login.numConceptsTest != 0}"
style="margin-left: 37px;">
<ice:outputText value="checking render"
styleClass="refineSearchFacetTitle"
style="margin-top: 10px;" />
<br />
</ice:panelSeries>
<ice:outputText value="#{personBean.tester}"></ice:outputText>
</ice:form>
The NPE is coming from the following code: #{login.numConceptsTest != 0}. The exception is only thrown when using a UISeries component type. It is not evaluated with a basic outputText component.
<ice:form id="loginForm" rendered="false">
<ice:panelSeries
value="#{personBean.searchFacetValueLists}" var="sfvl"
rendered="#{login.numConceptsTest != 0}"
style="margin-left: 37px;">
<ice:outputText value="checking render"
styleClass="refineSearchFacetTitle"
style="margin-top: 10px;" />
<br />
</ice:panelSeries>
<ice:outputText value="#{personBean.tester}"></ice:outputText>
</ice:form>
The NPE is coming from the following code: #{login.numConceptsTest != 0}. The exception is only thrown when using a UISeries component type. It is not evaluated with a basic outputText component.
Found the simplest fix involving the way CustomComponentUtils.isAncestorRendered() is used. It is used by UISeries only and so should have no side effects. (It was also once used by PanelTabSet but later that change was backed out. Probably it caused the same issues back then.)
Now if ancestor is not rendered, then neither value nor rendered attribute should give exceptions.
Revision: 25201
Modified : /icefaces2/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/panelseries/UISeries.java
Revision: 25202
Modified : /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/compat/components/src/main/java/com/icesoft/faces/component/panelseries/UISeries.java