9 Replies Latest reply on Apr 5, 2010 11:36 AM by dirkdaems

    a4j:region and rich:dataTable partial rendering

    dirkdaems

      Hi,

       

      I use RichFaces 3.3.2.

      I created a page with a rich:dataTable on it containing sortable colums. This page is included in another page using the Facelets ui:include tag. When I click on the header of a column to change the sort order, other components on the page are rerendered too.

       

      I thought the renderRegionOnly attribute of the a4j:region tag prevented that?

      Am I doing something wrong?

       

          <a4j:region renderRegionOnly="true">

       

                  <rich:dataTable id="userTable"
                                  value="#{userTableBean.users}"
                                  var="user"
                                  rows="15"
                                  width="100%">
         
                    <f:facet name="header">
             
                              <rich:datascroller id="userTableScroller"
                                             page="#{userTableBean.currentPage}"
                                                 renderIfSinglePage="false"
                                                 fastControls="hide"
                                                 align="right">
             
                                  <f:facet name="first">
                                 <h:outputText value="#{bundle.firstLabel}"/>
                                </f:facet>
                             <f:facet name="first_disabled">
                                 <h:outputText value="#{bundle.firstLabel}"/>
                             </f:facet>
                             <f:facet name="last">
                                 <h:outputText value="#{bundle.lastLabel}"/>
                             </f:facet>
                             <f:facet name="last_disabled">
                                 <h:outputText value="#{bundle.lastLabel}"/>
                             </f:facet>
                             <f:facet name="previous">
                                 <h:outputText value="#{bundle.previousLabel}"/>
                             </f:facet>
                             <f:facet name="previous_disabled">
                                 <h:outputText value="#{bundle.previousLabel}"/>
                             </f:facet>
                             <f:facet name="next">
                                 <h:outputText value="#{bundle.nextLabel}"/>
                             </f:facet>
                             <f:facet name="next_disabled">
                                 <h:outputText value="#{bundle.nextLabel}"/>
                             </f:facet>
                     
                              </rich:datascroller>
         
                    </f:facet>
         
                      <rich:column sortBy="#{user.login}"
                                   styleClass="table_column_left">
                          <f:facet name="header">
                              <h:outputText value="#{bundle.field_username}"/>
                          </f:facet>
                          <h:outputText value="#{user.login}"/>
                      </rich:column>                               
         
                      <rich:column sortBy="#{user.password}"
                                   styleClass="table_column_left">
                          <f:facet name="header">
                              <h:outputText value="#{bundle.field_password}"/>
                          </f:facet>
                          <h:outputText value="#{user.password}"/>
                      </rich:column>
         
                      <rich:column sortBy="#{user.emailAddress}"
                                   styleClass="table_column_left">
                          <f:facet name="header">
                              <h:outputText value="#{bundle.emailAddressLabel}"/>
                          </f:facet>               
                          <h:outputText value="#{user.emailAddress}"/>
                      </rich:column>

       

                      <rich:column sortBy="#{user.emailAddress}"
                                   styleClass="table_column_left">
                          <f:facet name="header">
                              <h:outputText value="#{bundle.activeSessionsLabel}"/>
                          </f:facet>               
                          <h:outputText value="#{user.activeSessions}"/>
                      </rich:column>

       

                      <rich:column styleClass="table_column_center">
                          <h:selectBooleanCheckbox value="#{subscription.sendInfo}"
                                                 disabled="true"/>
                      </rich:column>

       

                  </rich:dataTable>

       

              </a4j:region>

       

      Kind regards,

      Dirk Daems