I'm noticing that the displaytag code is inconsistent (and wrong)
about how it interprets the "order" parameters ("d-nnnn-o") on tables.

When tables are sorted by displaytag - that is, in the simple case of
non-external sort/pagination, the sort always seems to be done in
ascending order when the sort column switches, regardless of the
"order" parameter coded into the header cells.  That is, when a table
is given a "defaultorder" attribute with the value "descending", then
each non-active header cell is given a URL with an order parameter
with value "2", which is correct.  That should tell displaytag to sort
in descending order.  However, it does not do so - the sort on a
newly-selected header cell is always in ascending order, and the class
of the now-sorted table header cell is set to "order1".  That makes
the UI work visually, but it's not actually correct.

In the case of external sorting, things are similar but worse.  The
code still gives non-active header cells an "order" parameter as per
the "defaultorder" table attribute.  The external sorting code in my
world obeys the requested sort order, which I consider to be the right
thing to do. However, the displaytag code sets the class of the
resulting table header cell to the opposite of the requested order.
In other words, if the sort order parameter on the header cell link
has value "2", the header cell on the new table (when the page
reloads) will be given the class "order1".  If the order parameter has
value "1", the header class is set to "order2".  That's backwards, if
it's not obvious.

-- 
Turtle, turtle, on the ground,
Pink and shiny, turn around.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to