title: how to update h:panelGroup using f:ajax
body: <p>How to update h:panelGroup using f:ajax.When, i select h:selectBooleanCheckbox getting value from officeAdd1 and set this value into headOfficeAdd1.Am getting officeAdd1 value in bean but i want to update value into headOfficeAdd1.</p>
  
  <p>Thanks...</p>
  
  <pre><code>      &lt;h:form id="form"&gt;
     &lt;p:panel id="display"&gt;            
                  &lt;p:spacer width="20" /&gt;
                  &lt;h:panelGrid columns="6"&gt;
                      &lt;h:outputLabel value="Address:"
                          style="text-align: left;display: block;width:130px;" /&gt;
                      &lt;p:inputTextarea
                          value="#{companyInformationBean.current.officeAdd1}"
                          autoResize="true" style="width:170px;" maxlength="150" /&gt;
  
                  &lt;/h:panelGrid&gt;
  
                  &lt;h:panelGrid columns="6"&gt;
                      &lt;h:selectBooleanCheckbox id="remember"
                          value="#{companyInformationBean.current.checkBox}"&gt;
                          &lt;f:ajax event="click" execute="@form"
                              listener="#{companyInformationBean.checkBoxValue}" /&gt;
                      &lt;/h:selectBooleanCheckbox&gt;
                      &lt;h:outputLabel value="Same as Registered Office Address"
                          style="text-align: left;display: block;" /&gt;
                      &lt;p:spacer width="20" /&gt;
  
                  &lt;/h:panelGrid&gt;
                  &lt;p:spacer width="20" /&gt;
                  &lt;h:panelGroup id="hidepanelgroup"&gt;
                  &lt;h:panelGrid id="getaddress" columns="6"&gt;
                      &lt;h:outputLabel value="Head Office Address:"
                          style="text-align: left;display: block;width:130px;" /&gt;
                      &lt;p:inputTextarea id="headadd"
                          value="#{companyInformationBean.current.headOfficeAdd1}"
                          autoResize="true" style="width:170px;" maxlength="150" /&gt;
  
                 &lt;/h:panelGrid&gt;
                 &lt;/h:panelGroup&gt;
     &lt;/p:panel&gt; 
     &lt;/h:form&gt;
  </code></pre>
  
  <p>Bean:</p>
  
  <pre><code>      public void checkBoxValue()
  {
      if(current.getCheckBox()==true)
      {
  
              logger.info("getofadd"+current.getOfficeAdd1());
              current.setHeadOfficeAdd1(current.getOfficeAdd1());
  
      }
      else
      {
              logger.info("checkbox value false");
      }
  }
  </code></pre>