Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4671466
By: ed_j_webb
If you need access to the pageContext and the row's object then you have to
use a TableDecorator.
Your displaytag:column becomes:
<display:column title="Name" property="manufacturerNameLink"
sortProperty="manufacturerName" sortable="true" />
You then create a method in your TableDecorator called:
public String getManufacturerNameLink() {
MyObject obj = (MyObject)this.getCurrentRowObject();
PageContext ctx = this.getPageContext();
StringBuffer sb = new StringBuffer();
... create the hyperlinked manufacturer's name using the StringBuffer ...
return sb.toString();
}
This ensures that the column is sorted by the undecorated manufacturerName
property
but is displayed using the method in your decorator.
Ed!
http://displaytag.sourceforge.net/11/tut_decorators.html
______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=249318
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user