href in column tag duplicated on all rows when non-static value is specified
-----------------------------------------------------------------------------
Key: DISPL-645
URL: http://jira.codehaus.org/browse/DISPL-645
Project: DisplayTag
Issue Type: Bug
Affects Versions: 1.2
Reporter: Elbyron Whyndon
In some cases a RESTful url is used and thus requires a non-static href for a
column, that does not use the typical
http://domain/page.jsp?paramName=paramValue format. Thus the paramId attribute
does not help. Instead, the url is calculated by the controller and added to
the backing object. The href attribute for the column should allow a dynamic
value as shown in this example:
<display:table name="${taskList}" id="taskTable">
<display:column property="taskName" href="${taskTable.taskUrl}"/>
In this example, taskList refers to a list of Task objects that have taskName
and taskUrl strings.
The expected behavior is that each row in the table will be hyperlinked with
the unique URL obtained from taskUrl for each Task object. However, all of the
rows end up getting the URL of the first object.
Workaround:
<display:column><a
href="${taskTable.taskUrl}">${taskTable.taskName}</a></display:column>
This workaround results in each row getting the appropriate URL, but makes it
harder to escape any HTML found in the taskName.
--
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
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
displaytag-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel