title: rendering <h:panelGroup> by ajax in jsf
body: <p>I've got this piece of code, which doesn't do exactly what I thought. I try to set property by Ajax and then re-render one component. My .xhtml looks like this</p>
  
  <pre><code>    &lt;h:form&gt;
          &lt;h:commandButton value="Render!" &gt;
              &lt;f:ajax render=":result" listener="#{eFindUser.findUser}" /&gt;
          &lt;/h:commandButton&gt;
  
      &lt;/h:form&gt;
  
      &lt;h:panelGroup id="result" layout="block" rendered="#{eFindUser.responseRendered}" &gt;
          This is some text that is supposed to be rendered later
      &lt;/h:panelGroup&gt;
  </code></pre>
  
  <p>the backing bean looks like this</p>
  
  <pre><code>@Named(value = "eFindUser")
  @ViewScoped
  public class EFindUserManagedBean implements Serializable{
      private boolean responseRendered = false;
      /**
       * Creates a new instance of EFindUserManagedBean
       */
  
      public EFindUserManagedBean() {
      }
  
      public void findUser(AjaxBehaviorEvent abe) {
          responseRendered = !responseRendered;
          System.out.println("finding..... ("+ responseRendered+")" + this);
      }
      public boolean isResponseRendered() {
          return responseRendered;
      }
  
      public void setResponseRendered(boolean responseRendered) {
          this.responseRendered = responseRendered;
      }       
  }
  </code></pre>
  
  <p>When I re-click the button, the property is not changed. There is a message in serverlog, which says</p>
  
  <pre><code>INFO: finding..... (true)backingbeans.EFindUserManagedBean@5736b751
  INFO: finding..... (true)backingbeans.EFindUserManagedBean@23959d6f
  </code></pre>
  
  <p>Clearly there is some issue with the managed bean as it is created every time there is a request even if it should be view-scoped.</p>
  
  <p>What should I change so the panelgroup(id:"result") could change it's visibility? No richfaces or any other technology allowed.</p>
  
  <p>Thank you very much for your answers</p>