Feature Requests item #980725, was opened at 2004-06-27 09:28
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=536616&aid=980725&group_id=73068
Category: main taglib
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: David E (halcy)
Assigned to: Nobody/Anonymous (nobody)
Summary: ColumnTag Inline Taglibraries Enhancement
Initial Comment:
Ok here is a revised version of the patch, it passes all
maven tests that
the current version on CVS does. Once again to
reiterate its use and
usefulness here is what it offers:
You can now use taglibraries inside the coumn tag to
manipulate its output
while maintaining the ability to sort the column, etc.
For example:
<display-el:column property="userName"
title="UserName" sortable="true"
class="displayTag">
<a href="<html-el:rewrite
forward="admin.user.editUser"/>?id=<bean:write
name="user" property="id"/>"
target="_top"><bean:write name="user"
property="userName"/></a>
</display-el:column>
Allows me to sort by username, and infact the column
will still display the
username, however it will be a link to another area on
the site, and its
pulling in additional variables from that row at the same
time. This is
significantly easier than writing a ColumnDecorator IMO,
and doesn't require
manually rebuilding source code to make modifications..
(your container
should just rebuild the jsp when changes are noticed).
This has been
immensely useful all over our site, another example
would be if you want to
display dates differently than the standard date output
format:
<display-el:column property="expirationDate"
title="Expires"
sortable="true" class="displayTag">
<logic:notEmpty name="user"
property="expirationDate"><dt:format
pattern="MM/dd/yyyy"><bean:write name="user"
property="expirationDate.time"/></dt:format></logic:not
Empty>
</display-el:column>
You will note that this column is still sortable, however it
will display
exactly the date I want and its very easy to change and
do this within the
jsp.
One further example we have an area on the site that
lists files a user can
download, I'm using a FileWrapper around the java.io.File
type to expose
length and another variables as a java bean property.
We know that length
is output in bytes, but we want to display the value in
kb to the end user
(yes i realize my algorithm here isnt perfect but it
works).. so an example
of that:
<display-el:column property="length" title="Size"
sortable="true" class="displayTag AlignRight">
<%= ((FileWrapper)pageContext.findAttribute
("file")).getLength().longValue() /
1024 %>kb
</display-el:column>
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=536616&aid=980725&group_id=73068
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel