Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/browse/DISPL-69

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: DISPL-69
    Summary: option to strip html before sort
       Type: Improvement

     Status: Unassigned
   Priority: Critical

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: DisplayTag
 Components: 
             Tag Library
   Versions:
             1.0 RC2

   Assignee: 
   Reporter: Dan Allen

    Created: Mon, 18 Oct 2004 11:29 AM
    Updated: Mon, 18 Oct 2004 11:29 AM

Description:
Often times it is necessary to allow for a conditional use of the href attribute on a 
column (creating a link, or not creating a link, based on the contents of the column). 
 However, if the link is created manually inside the contents of the column tag (as 
opposed to using the href attribute on the column) the sorting functionality is 
affected because it now includes the html markup in the value of each column.

Example:

<display:column property="id" sortable="true">
  <c:if test="${not empty row.id}"><html:link action="ViewItem?id=${row.id}"><c:out 
value="${row.name}"/></c:if>
  <c:if test="${empty row.id}">[empty]</c:if>
</display:column>

Output:

<a href="/app/ViewItem?id=6">Mountain Bike</a>
[empty]
<a href="/app/ViewItem?id=3">Canoe</a>
<a href="/app/ViewItem?id=8">Tent</a>
[empty]

The problem with the above code is that the sort will actually occur on the value of 
the id rather than the name.  However, since the end user sees a name in the column, 
that person would expect it to be sorting on name.  Under no circumstance would a sort 
on the url be desirable.


---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to