4 Replies Latest reply on Feb 9, 2010 11:29 AM by boy18nj

    Disable full page refresh during sorting click ?

    boy18nj

      Below code is responsible for sorting the table column value's. But whenever i do sort, it causes full page refresh, is there way I can avoid the full page refresh. So whenever i sort column's it does just rich table refresh.

      `

      <s:link view="/CollatRptCatgryMapList.xhtml"
                  rendered="#{collatRptCatgryMapList.previousExists}"
                     value="#{messages.left}#{messages.left} First Page"
                        id="firstPage">
                <f:param name="firstResult" value="0"/>
              </s:link>

       

              <s:link view="/CollatRptCatgryMapList.xhtml"
                  rendered="#{collatRptCatgryMapList.previousExists}"
                     value="#{messages.left} Previous Page"
                        id="previousPage">
                  <f:param name="firstResult"
                          value="#{collatRptCatgryMapList.previousFirstResult}"/>
              </s:link>

       

              <s:link view="/CollatRptCatgryMapList.xhtml"
                  rendered="#{collatRptCatgryMapList.nextExists}"
                     value="Next Page #{messages.right}"
                        id="nextPage">
                  <f:param name="firstResult"
                          value="#{collatRptCatgryMapList.nextFirstResult}"/>
              </s:link>

       

              <s:link view="/CollatRptCatgryMapList.xhtml"
                  rendered="#{collatRptCatgryMapList.nextExists}"
                     value="Last Page #{messages.right}#{messages.right}"
                        id="lastPage">
                  <f:param name="firstResult"
                          value="#{collatRptCatgryMapList.lastFirstResult}"/>
              </s:link>

      `

        • 1. Re: Disable full page refresh during sorting click ?
          ilya_shaikovsky
          use a4j:commandLink
          • 2. Re: Disable full page refresh during sorting click ?
            boy18nj

            Sorry this is the right code responsible for sorting out table column's. This is generated by Seam-Gen.

             

            Ilya, i followed your suggestion-

             

            After Changes-

                <a4j:commandLink styleClass="columnHeader" value="#{propertyLabel} #{entityList.orderColumn == propertyPath ? (entityList.orderDirection == 'desc' ? messages.down : messages.up) : ''}">
                    <f:param name="sort" value="#{propertyPath}"/>
                    <f:param name="dir" value="#{entityList.orderColumn == propertyPath and entityList.orderDirection == 'asc' ? 'desc' : 'asc'}"/>
                </a4j:commandLink>
            

             

             

            Now the problem is when i click on the column's name to sort-nothing do happens.

             

            Before Changes-

                <s:link styleClass="columnHeader" value="#{propertyLabel} #{entityList.orderColumn == propertyPath ? (entityList.orderDirection == 'desc' ? messages.down : messages.up) : ''}">
                    <f:param name="sort" value="#{propertyPath}"/>
                    <f:param name="dir" value="#{entityList.orderColumn == propertyPath and entityList.orderDirection == 'asc' ? 'desc' : 'asc'}"/>
                </s:link>
            

             

            • 3. Re: Disable full page refresh during sorting click ?
              ilya_shaikovsky
              you not defined reRender - so nothing updated.
              • 4. Re: Disable full page refresh during sorting click ?
                boy18nj
                ya that's what i realized after posting the message. Thanks Ilya. You rock.