[ http://jira.codehaus.org/browse/DISPL-259?page=all ] fabrizio giustina closed DISPL-259: -----------------------------------
Resolution: Duplicate Fix Version: 1.1 Spaces may also be important for some uses, if you need to trims whitespace you easily do that by suppling a custom comparator, see DISPL-18 > Strings should be trimmed before sort > ------------------------------------- > > Key: DISPL-259 > URL: http://jira.codehaus.org/browse/DISPL-259 > Project: DisplayTag > Type: Improvement > Components: Paging/Sorting > Versions: 1.0 > Priority: Minor > Fix For: 1.1 > > > When there is no property and no sortProperty on a column, the rows are > sorted using the raw text of the column. The text should be trimmed fefore > sorting, else the number of whitespaces before the actual text has an impact > on the sort. > For example, if I have a column like this: > <display:column titleKey="entreprises.type" > sortable="true"> > <c:choose> > <c:when test="${entreprise.type == 1}"> > SARL > </c:when> > <c:when test="${entreprise.type == 2}"> > Société > </c:when> > <c:otherwise> > SA > </c:otherwise> > </c:choose> > </display:column> > The first rows are the one with SA, then the ones with Société and finally > the ones with SARL, which isn't alphabetically correct. This is just because > the number of white spaces is not the same depending on the enterprise type. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click _______________________________________________ displaytag-devel mailing list displaytag-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/displaytag-devel