Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.1
-
Fix Version/s: 1.1
-
Component/s: Paging/Sorting
-
Labels:None
-
Application server:Apache Tomcat/5.0.28
Description
Snapshot displaytag-1.1-20060103.091119-1
When using external sorting, if the column property "sortName" is an integer (for example an index in a collection) it is interpreted as Display tag's sortedColumnNumber instead of sortedColumnName.
This results in failure of generating the correct header link for the sorted column (CSS style, ascending/descending).
My quick fix was to simply set the value to both the sortedColumnNumber and the sortedColumnName, when the integer is parsed succesfully. org.displaytag.tags.TableTag.initParameters line 886. (displaytag-1.1-20060103.091119-1)
When using external sorting, if the column property "sortName" is an integer (for example an index in a collection) it is interpreted as Display tag's sortedColumnNumber instead of sortedColumnName.
This results in failure of generating the correct header link for the sorted column (CSS style, ascending/descending).
My quick fix was to simply set the value to both the sortedColumnNumber and the sortedColumnName, when the integer is parsed succesfully. org.displaytag.tags.TableTag.initParameters line 886. (displaytag-1.1-20060103.091119-1)
This also affects sorting if the sortName integer happens to fall in the range of headerCellList.size() - 1. In this case the rows are sorted by Display tag even though external sorting is used. This happens in org.displaytag.model.TableModel.getSortedColumnHeader.
The actual problem might be in org.displaytag.tags.TableTag.doEndTag line 1198. (this.paginatedList == null || this.tableModel.isLocalSort()). When using external sorting without implementing the PaginatedList interface, the if statement resolves as true and continues on to sorting a paged list.