DisplayTag
  1. DisplayTag
  2. DISPL-484

Ability to set sortName == columnName

    Details

    • Type: Wish Wish
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1.1
    • Fix Version/s: None
    • Component/s: Paging/Sorting
    • Labels:
      None
    • Application server:
      tomcat 5.5.17

      Description

      Hi,

      I am now using the external paging & sorting with some success. I think we need a good example of this in the docs - it is not very straightforward and is poorly documented (understandable). I can post something after I get this all finalized.

      Anyway, I don't understand the idea of having the sortName attribute. Is there ever a case where you'd want <d:column property="book.author.firstName" sortName="somethingBesidesThat" /> over <d:column property="book.author.firstName" sortName="book.author.firstName" /> ? Really I can't figure that out, why not just go off of the property? I'd imagine everyone who has used that attribute just copy & pasted the property attribute and changed it to say sortName. If so this should be looked at but maybe I am overlooking another (hopefully common) use case.

      I was able to quickly hack ColumnTag - in addHeaderToTable, I just said headerCell.setSortName(this.property); instead of this.sortName. Works fine for me, but I think this deserves some consideration as I'd imagine this is what 99% of everyone will want. Yes? No?

      If everyone fully agrees, why not just nix the whole sortName thing and say if sort="external" just put the property in the href? If you'd like to keep it the way it is, why not add a sortByProperty="true" attribute to table tag to do what I hacked in. I like solution #2, non intrusive, keeps backwards compatibility, allows other sortNames if anyone actually does that, and will save most everyone a lot of typing - I think it makes a lot of sense. I could provide a patch for either of these if given the go ahead.

        Activity

        Hide
        John Newman added a comment -
        sorry the title was supposed to say Ability to set sortName == property
        Show
        John Newman added a comment - sorry the title was supposed to say Ability to set sortName == property
        Hide
        Kevin Conaway added a comment -
        Would the sortProperty attribute do what you're after?
        Show
        Kevin Conaway added a comment - Would the sortProperty attribute do what you're after?

          People

          • Reporter:
            John Newman
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - 1 hour, 30 minutes
              1h 30m
              Remaining:
              Remaining Estimate - 1 hour, 30 minutes
              1h 30m
              Logged:
              Time Spent - Not Specified
              Not Specified