DisplayTag
  1. DisplayTag
  2. DISPL-125

Preserve The Current Page And Sort Across Sessions (patch included)

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0 RC2
    • Fix Version/s: 1.2
    • Component/s: Paging/Sorting
    • Labels:
      None

      Description

      ====
      imported from sf tracker
      id 980723
      submitted by David E - halcy
      http://sourceforge.net/support/tracker.php?aid=980723
      ====

      Here is another enhancement for the project. It adds
      the attribute
      "preserveSortAndPage" to the table tag in both EL and
      standard versions.
      The idea is that (at least from usage on our own site)
      someone can sort a
      large list and get it exactly as they like it, then perhaps
      navigate away to
      something else, and would like to when they return see
      it the same way they
      left it (potentially, the data could change). However
      navigating back to it
      they likely wouldnt have the request parameters needed
      to sort it as it was,
      so when the preserveSortAndPage attribute is set to
      true, the current
      sort/page/sort order (and potentially previous sort/sort
      order) are all
      saved into session attributes named the same as they
      would as request
      parameters.

      When the tag is executed and the preserveSortAndPage
      attribute is set to
      true it will first check the request parameters for the
      necessary
      information, and if it returns null from there it will
      fallback to session,
      then eventually to defaults.

      There is an inherent limitation to this, if someone had a
      list somewhere
      else on the site and it was using the same name
      variables for its list, and
      it also had the preserveSortAndPage attribute set the
      variables could clash,
      thats a limitation of the parameter encoder. I thought
      about tweaking the
      parameter encoder to also encode perhaps the current
      request.uri which would
      be unique to that list because it would be on a different
      page from another
      list, however we use struts and when I watched that
      value with the debugger
      it was just pointing to my base tiles layout.. (which was
      surprising to
      me).. so that wouldnt uniquely define the list either. So
      my conclusion is
      it should be a documented limitation for people that
      want to use this
      feature, they need to name their lists differently if they
      are going to use
      them across the site.

        Activity

        Hide
        fabrizio giustina added a comment -
        patch
        Show
        fabrizio giustina added a comment - patch
        Hide
        Mike Robinson added a comment -
        Is this patch to be applied to the RC2 code base?
        Show
        Mike Robinson added a comment - Is this patch to be applied to the RC2 code base?
        Hide
        added a comment -
        http://www.jsvelho.org <a href="http://www.jsvelho.org">payday loan</a> thanks
        Show
        added a comment - http://www.jsvelho.org <a href=" http://www.jsvelho.org ">payday loan</a> thanks
        Hide
        added a comment -
        http://www.mylosoft.com/ <a href="http://www.mylosoft.com/">poker</a> thanks for your site
        Show
        added a comment - http://www.mylosoft.com/ <a href=" http://www.mylosoft.com/ ">poker</a> thanks for your site
        Hide
        Stephanie Sherriff added a comment -
        Would it be possible to get a patch for this issue that would work for 1.1? You show that the fixed version is after 1.1, I assume that means not including 1.1. I desperately need this fix and am using version 1.1, so it would be great to be able to get a patch that works with the most recent version.

        Cheers
        Show
        Stephanie Sherriff added a comment - Would it be possible to get a patch for this issue that would work for 1.1? You show that the fixed version is after 1.1, I assume that means not including 1.1. I desperately need this fix and am using version 1.1, so it would be great to be able to get a patch that works with the most recent version. Cheers
        Hide
        Mohan Vijayakumar added a comment -
        It will be really great if this patch is incorporated with displaytag 1.1. I am in crunch situation and i would really appreciate if the 1.1 version includes this fix too.

        Show
        Mohan Vijayakumar added a comment - It will be really great if this patch is incorporated with displaytag 1.1. I am in crunch situation and i would really appreciate if the 1.1 version includes this fix too.
        Hide
        fabrizio giustina added a comment -
        implemented in 1.2
        Show
        fabrizio giustina added a comment - implemented in 1.2
        Hide
        srini Dan added a comment -
        pls can you describe how to declare PARAMETER_PREVIOUSSORT,PARAMETER_PREVIOUSSORT in TableTagParameters class because these varibale are used in Tabletag.java
        Regards
        srinivas
        Show
        srini Dan added a comment - pls can you describe how to declare PARAMETER_PREVIOUSSORT,PARAMETER_PREVIOUSSORT in TableTagParameters class because these varibale are used in Tabletag.java Regards srinivas

          People

          • Reporter:
            fabrizio giustina
          • Votes:
            12 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: