ICEfaces
  1. ICEfaces
  2. ICE-7314

Backing bean called on children of non-rendered elements

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: EE-2.0.0.GA
    • Fix Version/s: 2.1-Beta, EE-2.0.0.GA_P01
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      IceFaces 2.0 EE, Mojarra 2.1.2, Tomcat 7

      Description


      I have recreated it with simple test page:

      <h:form id="form">
                  <h:panelGroup rendered="#{param.show}">
                      <ice:dataTable value="#{myBean.list}" var="item">
                          <ice:column>#{item}</ice:column>
                      </ice:dataTable>
                      <h:outputText value="#{myBean.someText}"/>
                      <br/>
                      <h:outputText value="#{myBean.someText2}"/>
                  </h:panelGroup>
      </h:form>

      @ManagedBean
      @SessionScoped
      public class MyBean implements Serializable
      {
          
          private ArrayList<String> list;
          private String someText;
          private String someText2;


          public MyBean()
          { }
          
          @PostConstruct
          public void init()
          {
              String text = "number ->";
              list = new ArrayList<String>();
              for (int i = 0; i < 10; i++)
              {
                  list.add(text+" "+i);
                  
              }
              
              someText = "Total numbers = 10";
              someText2 = "set show=false to check is this text getter is called when rendered = false;";
          }

          public ArrayList<String> getList() {
              return list;
          }

          public void setList(ArrayList<String> list) {
              this.list = list;
          }

          public String getSomeText() {
              return someText;
          }

          public void setSomeText(String someText) {
              this.someText = someText;
          }

          public String getSomeText2() {
              return someText2;
          }

          public void setSomeText2(String someText2) {
              this.someText2 = someText2;
          }

      After running this fragment, notice that getList() method is invoked when ?show=false, while getSomeText() and getSomeText2() are not called. If ?show=true all 3 getters are called.

        Issue Links

          Activity

          There are no subversion log entries for this issue yet.

            People

            • Assignee:
              Unassigned
              Reporter:
              Evgheni Sadovoi
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: