Details
-
Type:
Wish
-
Status:
Open
-
Priority:
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.
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.