DisplayTag
  1. DisplayTag
  2. DISPL-586

keepStatus not working properly with external sorting and paging

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2
    • Fix Version/s: None
    • Component/s: Paging/Sorting
    • Labels:
      None
    • Application server:
      Tomcat 5

      Description

      I'm using sort="external" and partialList="true" and keepStatus="true". The page number and the sort direction are stored in the session, but the sort column not is not which makes this 1.2 feature unusable with external sorting and paging.

        Activity

        Hide
        Alvaro Villarroel added a comment -
        I modify these lines in order to have de keepStatus work with sort="external" :


        The original code is:

        if (!this.tableModel.isLocalSort())
                {
                    // our sort column parameter may be a string, check that first
                    String sortColumnName = requestHelper.getParameter(encodeParameter(TableTagParameters.PARAMETER_SORT));

                    // if usename is not null, sortColumnName is the name, if not is the column index
                    String usename = requestHelper.getParameter(encodeParameter(TableTagParameters.PARAMETER_SORTUSINGNAME));


        The modificated code is:

        if (!this.tableModel.isLocalSort())
                {
                    // our sort column parameter may be a string, check that first
                    String sortColumnName = getFromRequestOrSession(request, requestHelper, TableTagParameters.PARAMETER_SORT);

                    // if usename is not null, sortColumnName is the name, if not is the column index
                    String usename = getFromRequestOrSession(request, requestHelper, TableTagParameters.PARAMETER_SORTUSINGNAME);
                    

        So I just used "getFromRequestOrSession" method instead of "requestHelper.getParameter" for external sorting
        Show
        Alvaro Villarroel added a comment - I modify these lines in order to have de keepStatus work with sort="external" : The original code is: if (!this.tableModel.isLocalSort())         {             // our sort column parameter may be a string, check that first             String sortColumnName = requestHelper.getParameter(encodeParameter(TableTagParameters.PARAMETER_SORT));             // if usename is not null, sortColumnName is the name, if not is the column index             String usename = requestHelper.getParameter(encodeParameter(TableTagParameters.PARAMETER_SORTUSINGNAME)); The modificated code is: if (!this.tableModel.isLocalSort())         {             // our sort column parameter may be a string, check that first             String sortColumnName = getFromRequestOrSession(request, requestHelper, TableTagParameters.PARAMETER_SORT);             // if usename is not null, sortColumnName is the name, if not is the column index             String usename = getFromRequestOrSession(request, requestHelper, TableTagParameters.PARAMETER_SORTUSINGNAME);              So I just used "getFromRequestOrSession" method instead of "requestHelper.getParameter" for external sorting
        Hide
        Cameron Ahana added a comment -
        I ran into the same problem. getFromRequestorSession() returns an Integer so I modified this method to return a String and store the values in the session as Strings. I then called this method just like Alvaro did for the sortColumnName and usename parameters.
        Show
        Cameron Ahana added a comment - I ran into the same problem. getFromRequestorSession() returns an Integer so I modified this method to return a String and store the values in the session as Strings. I then called this method just like Alvaro did for the sortColumnName and usename parameters.

          People

          • Reporter:
            Aurora Zaharia
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: