Multiple enhancement incl. Localization, column ordering and more.
------------------------------------------------------------------
Key: DISPL-219
URL: http://jira.codehaus.org/browse/DISPL-219
Project: DisplayTag
Type: Improvement
Components: Tag Library, Paging/Sorting, I18N, HTML Generation, Decorators
Versions: 1.0
Reporter: Barak Ori
Attachments: displaytag.zip
The following enhancements are suggested (many were already suggested, but
since a patch is included I'll list anything under this patch):
1. More robust column decorators that in which the decorate method has the
following added parameters: row object (to allow decorations using multiple
columns) and page context (essential for localization). A suggested interface
is included without breaking existing code that uses the old interface.
2. An abstract implementation of the more robust column decorator that exposes
an additional parameter - the user's locale (based on DisplayTag's locale
resolver). Now creating locale aware decorators is really easy - just extend
this basic implementation and implement the decorate method.
3. Extend the TableDecorator class to allow for dynamically specifying the CSS
style of each <TR> in the table. This is useful for highlighting specific rows
in the table (e.g. subtotal rows).
4. Add a "show" attribute (boolean) to <display:column> to allow for easy
showing/hiding of columns (e.g. not showing a sensitive column to some users
although the model contains the information).
5. Adding the possibility to specify the order of columns within the table. The
order of the <display:column> tags is the default order, but you can specify an
alternate order. One can provide UI for user-selected column order (not
included...)
6. Defining columns that span multiple cells (using colspan), this can be
dynamically specified per row, and works well with column reordering (See more
information below).
7. Using external sorting. In a paged situation, it's a shame DisplayTag has to
process the whole lines just to determine the sort order. In many cases it's
better to leave the sorting task to the backend (and probably the DB), and show
the rows in the order they appear. Still, DisplayTag still needs to properly
render the sorting marks on sortable columns, just not perform the sort. Note:
the implemented patch here doesn't provide a back-end sorting mechanism. Just a
way to stop DisplayTag from sorting, even when clicking on a column to sort
(See more information below).
That's it. The included zip file contains the following:
1. A Linux unidirectional diff from DisplayTag 1.0 to the modified code. The
diff against the current CVS doesn't make sense since all changes were made to
the folder structure (the 'main' folder). Plus, I couldn't make the changes
against the latest build. I need this in production soon, so I had to base my
changes on a stable version. The patch file includes tests to enhancements 1-5.
2. All the changed files that are included in the above patch for easy
reference.
3. A PDF document describing how to use the enhanced features and how they were
developed. This is mostly useful for learning more about topics 6 and 7.
--
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 Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
displaytag-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel