title: JSF - Change panelGroup by using ajax calls - Beans, EL and?
body: <p>I have to make a sort of switch of some <code>panelGroup</code> UI. 
  About the view section, i made this :</p>
  
  <pre><code>&lt;h:panelGroup layout="block" id="profile_content"&gt;
      &lt;h:panelGroup layout="block" styleClass="content_title"&gt;
          Profilo Utente
      &lt;/h:panelGroup&gt;
  
      &lt;h:panelGroup rendered="#{selector.profile_page=='main'}"&gt;
          &lt;ui:include src="/profile/profile_main.xhtml" /&gt;
      &lt;/h:panelGroup&gt;
  
      &lt;h:panelGroup rendered="#{selector.profile_page=='edit'}"&gt;
          &lt;ui:include src="/profile/profile_edit.xhtml" /&gt;
      &lt;/h:panelGroup&gt;
  
      &lt;h:panelGroup rendered="#{selector.profile_page=='insert'}"&gt;
          &lt;ui:include src="/profile/profile_articles.xhtml" /&gt;
      &lt;/h:panelGroup&gt;
  &lt;/h:panelGroup&gt;
  </code></pre>
  
  <p>Now, to change this value, i written an exclusive JavaBean, called Selector :</p>
  
  <pre><code>@ManagedBean(name="selector")
  @RequestScoped
  public class Selector {
      @ManagedProperty(value="#{param.profile_page}")
      private String profile_page;
  
      public String getProfile_page() {
          if(profile_page==null || profile_page.trim().isEmpty()) {
              this.profile_page="main";
          }
          return profile_page;
      }
      public void setProfile_page(String profile_page) { this.profile_page=profile_page; }
  }
  </code></pre>
  
  <p>So, right now succeeds my problem : when i change the "context" by using some <code>h:commandButton</code>, i'd like to use asynch call to the server. This is my Button Panel :</p>
  
  <pre><code>&lt;h:commandButton value="EDIT"&gt;
      &lt;f:ajax event="action" execute="???" render=":profile_content"/&gt;
  &lt;/h:commandButton&gt;
  
  &lt;h:commandButton value="PM"&gt;
      &lt;f:ajax event="action" execute="???" render=":profile_content"/&gt;
  &lt;/h:commandButton&gt;
  
  &lt;h:commandButton value="ARTICLES"&gt;
      &lt;f:ajax event="action" execute="???" render=":profile_content"/&gt;
  &lt;/h:commandButton&gt;
  </code></pre>
  
  <p>I don't know what to put on <code>execute</code>, so that i edit the Beans value and i change the context by using <code>render=":profile_content"</code></p>
  
  <p>Hope this question is comprehendible. Forgive me about language :)</p>
  
  <p>Cheers</p>