title: why method called two times on changing styleClass condition
body: <p>This is my snipped part of xhtml.
  I have on condition changing styleClass. </p>
  
  <pre><code>`&lt;p:panel id="upload_host" header="CIB HOST" styleClass="#{(bulkToHostBean.titleBackground == 'true') ? 'greencolor' : 'redcolor'}"&gt;`
  </code></pre>
  
  <p>Below is my bean class file.
  The main purpose of this class file is to return boolean true or false.</p>
  
  <pre><code>@ManagedBean
  @SessionScoped
  public class BulkToHostBean {
  ......
  private boolean titleBackground;
  
  
  public boolean getTitleBackground() {
  
      int counter = 0;
  
      for(int i = 0; i &lt; hostList.size();i++ ) {
          if(hostList.get(i).getFile_status().trim().equals(Constant.DELAYED)) {
              counter = counter + 1;
          }
  
      }
      //counter = 0;
      if(counter == 0) {      
          logger.info("Set title background to Green");
          titleBackground = true;
      }else {
          logger.info("Set title background to DarkRed");
          titleBackground = false;
      }
      return titleBackground;
  }
  
  public void setTitleBackground(boolean titleBackground) {
      this.titleBackground = titleBackground;
  } 
  </code></pre>
  
  <p>And below is my console result from my eclipse. As you can see, the result printed twice at the same time.</p>
  
  <pre><code>Sep 13, 2017 5:00:50 PM 
  com.sheaf.payment.dashboard.managedbeans.BulkToHostBean getTitleBackground
  INFO: Set title background to DarkRed
  Sep 13, 2017 5:00:50 PM 
  com.sheaf.payment.dashboard.managedbeans.BulkToHostBean getTitleBackground
  INFO: Set title background to DarkRed
  </code></pre>
  
  <p>The code is working fine but I just wonder why it call method two times?
  Any idea why it call two times?</p>