ICEfaces
  1. ICEfaces
  2. ICE-4066

panelTabSet ignore parent's rendered attribute when put in UISeries component

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7, 1.7.1, 1.7.2, 1.7.2 SP1
    • Fix Version/s: 1.7.2-SP2, 1.8RC2, 1.8
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      ANY

      Description

      see the following code:

      <ice:form>
      <ice:panelSeries value="#{bean.list}" var="item">

      <ice:panelGroup rendered="false">

      <ice:panelTabSet id="icePnlTbSet" var="tab"
      value="#{bean.listqq}" title="title">
      <ice:panelTab label="#{tab}" title="#{tab}">
      <ice:panelGroup style="height:50px;">
      <ice:outputText value="#{tab}" />
      </ice:panelGroup>
      </ice:panelTab>
      </ice:panelTabSet>
      <!--
      <ice:outputText value="#{bean.qq}"/>
      -->
      </ice:panelGroup>

      </ice:panelSeries>
      </ice:form>

      It will complain undefined property "listqq" in the bean which should not be rendered at all. To compare, uncomment the outputText and it has no problem.
      This is also a problem for ice:dataTable

        Issue Links

          Activity

          Hide
          Sam Xiao added a comment -

          test case for tomcat 6.0 with ICEfaces 1.7.2 SP1

          Show
          Sam Xiao added a comment - test case for tomcat 6.0 with ICEfaces 1.7.2 SP1
          Hide
          Adnan Durrani added a comment -

          Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\panelseries\UISeries.java
          Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\paneltabset\PanelTabSet.java
          Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\util\CustomComponentUtils.java
          Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\panelseries\UISeries.java
          Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\paneltabset\PanelTabSet.java
          Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\util\CustomComponentUtils.java
          Completed: At revision: 18366

          Show
          Adnan Durrani added a comment - Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\panelseries\UISeries.java Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\paneltabset\PanelTabSet.java Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\util\CustomComponentUtils.java Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\panelseries\UISeries.java Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\paneltabset\PanelTabSet.java Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\util\CustomComponentUtils.java Completed: At revision: 18366
          Hide
          Adnan Durrani added a comment -

          Fix backported to 1.7 branch:

          Modified: D:\work\development\freshcopy\svn\ossrepo\icefaces\branches\icefaces-1.7\icefaces\component\src\com\icesoft\faces\component\panelseries\UISeries.java
          Modified: D:\work\development\freshcopy\svn\ossrepo\icefaces\branches\icefaces-1.7\icefaces\component\src\com\icesoft\faces\component\paneltabset\PanelTabSet.java
          Modified: D:\work\development\freshcopy\svn\ossrepo\icefaces\branches\icefaces-1.7\icefaces\component\src\com\icesoft\faces\component\util\CustomComponentUtils.java
          Sending content: D:\work\development\freshcopy\svn\ossrepo\icefaces\branches\icefaces-1.7\icefaces\component\src\com\icesoft\faces\component\panelseries\UISeries.java
          Sending content: D:\work\development\freshcopy\svn\ossrepo\icefaces\branches\icefaces-1.7\icefaces\component\src\com\icesoft\faces\component\paneltabset\PanelTabSet.java
          Sending content: D:\work\development\freshcopy\svn\ossrepo\icefaces\branches\icefaces-1.7\icefaces\component\src\com\icesoft\faces\component\util\CustomComponentUtils.java
          Completed: At revision: 18426

          Show
          Adnan Durrani added a comment - Fix backported to 1.7 branch: Modified: D:\work\development\freshcopy\svn\ossrepo\icefaces\branches\icefaces-1.7\icefaces\component\src\com\icesoft\faces\component\panelseries\UISeries.java Modified: D:\work\development\freshcopy\svn\ossrepo\icefaces\branches\icefaces-1.7\icefaces\component\src\com\icesoft\faces\component\paneltabset\PanelTabSet.java Modified: D:\work\development\freshcopy\svn\ossrepo\icefaces\branches\icefaces-1.7\icefaces\component\src\com\icesoft\faces\component\util\CustomComponentUtils.java Sending content: D:\work\development\freshcopy\svn\ossrepo\icefaces\branches\icefaces-1.7\icefaces\component\src\com\icesoft\faces\component\panelseries\UISeries.java Sending content: D:\work\development\freshcopy\svn\ossrepo\icefaces\branches\icefaces-1.7\icefaces\component\src\com\icesoft\faces\component\paneltabset\PanelTabSet.java Sending content: D:\work\development\freshcopy\svn\ossrepo\icefaces\branches\icefaces-1.7\icefaces\component\src\com\icesoft\faces\component\util\CustomComponentUtils.java Completed: At revision: 18426
          Hide
          Joanne Bai added a comment -

          QA tested it successfully on ICEfaces-1.8.0 build 3 + tomcat6 for IE6, FF2, Opera9.27. Both ice:panelTabSet and ice:dataTable passed the test.

          Show
          Joanne Bai added a comment - QA tested it successfully on ICEfaces-1.8.0 build 3 + tomcat6 for IE6, FF2, Opera9.27. Both ice:panelTabSet and ice:dataTable passed the test.
          Hide
          Ken Fyten added a comment -

          Follow-up regression created by this fix is noted in ICE-4253.

          Show
          Ken Fyten added a comment - Follow-up regression created by this fix is noted in ICE-4253 .
          Hide
          Joanne Bai added a comment -

          verified on 1.7.2-SP2 build 3 with success (tomcat 6 + IE6 and FF2)

          Show
          Joanne Bai added a comment - verified on 1.7.2-SP2 build 3 with success (tomcat 6 + IE6 and FF2)
          Hide
          ?ukasz Pogorzelski added a comment -

          The problem has been fixed only partially. As I see in the code:

          UISeries.java
              public Object getValue() {
                  try {
                      return super.getValue();
                  } catch (Exception e) {
                      //ICE-4066
                      if (CustomComponentUtils.isAncestorRendered(this)) {
                          throw new FacesException(e);
                      }
                  }
                  return null;
              }
          

          the method isAncestorRenderer finds the first ancestor and evaluates its rendered attribute. But what if ancestor rendered attribute is a value binding, and that ancestor should not be rendered at all ? Value binding is correct only for this panelGroup which is not rendered too. Below is a sample code:

          <ice:panelSeries value="#{bean.list}" var="item">
          
              <ice:panelGroup rendered="false">
          
                  <ice:panelPopup rendered="#{bean.visible}">
          
                      <ice:panelTabSet id="icePnlTbSet" var="tab" value="#{bean.listqq}" title="title">
                      <ice:panelTab label="#{tab}" title="#{tab}">
                          <ice:panelGroup style="height:50px;">
                          <ice:outputText value="#{tab}" />
                          </ice:panelGroup>
                       </ice:panelTab>
                       </ice:panelTabSet>
          
                  </ice:panelPopup>
          
              </ice:panelGroup>
          
          </ice:panelSeries>
          
          Show
          ?ukasz Pogorzelski added a comment - The problem has been fixed only partially. As I see in the code: UISeries.java public Object getValue() { try { return super .getValue(); } catch (Exception e) { //ICE-4066 if (CustomComponentUtils.isAncestorRendered( this )) { throw new FacesException(e); } } return null ; } the method isAncestorRenderer finds the first ancestor and evaluates its rendered attribute. But what if ancestor rendered attribute is a value binding, and that ancestor should not be rendered at all ? Value binding is correct only for this panelGroup which is not rendered too. Below is a sample code: <ice:panelSeries value= "#{bean.list}" var = "item" > <ice:panelGroup rendered= " false " > <ice:panelPopup rendered= "#{bean.visible}" > <ice:panelTabSet id= "icePnlTbSet" var = "tab" value= "#{bean.listqq}" title= "title" > <ice:panelTab label= "#{tab}" title= "#{tab}" > <ice:panelGroup style= "height:50px;" > <ice:outputText value= "#{tab}" /> </ice:panelGroup> </ice:panelTab> </ice:panelTabSet> </ice:panelPopup> </ice:panelGroup> </ice:panelSeries>

            People

            • Assignee:
              Unassigned
              Reporter:
              Sam Xiao
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: