myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Innes" <Tom.In...@allTiers.com>
Subject Datatable Issue
Date Fri, 25 Aug 2006 16:44:57 GMT
I am trying to debug an issue I created a couple of days ago.

 

https://issues.apache.org/jira/browse/TOMAHAWK-616

 

Basically auto sorting does not work under Facelets.  

 

I have created two projects a JSP project and a Facelets project which have
identical backing beans and other than the header includes, the pages are
the same.  The projects are a modified version of the car example with the
addition of a find button to populate the data and the use of a command link
on each row to allow the editing of the data.

 

The JSP version works fine, but the Facelets version only sorts one way and
the arrows indicating the direction of the sort are not displayed.

 

I have downloaded the 1.15 Snapshot source and have been tracing the code to
see if I can ascertain the problem.  

 

Some things I have observed include:

1.  The Code creates CommandSortHeaders which if they exist the Code then
displays the Arrow indicating the direction of sort.  Under the Facelets
version they are always OutputText and not CommandSortHeaders - thus no
error is ever displayed.  I can see them created when the Find Button is
pressed, but when the Command Link is pressed they are back to being
OutputText.  It is almost if somehow the state has been lost.

2.  The Facelets version sorts in ascending order always.  I have traced the
sort method in SortableModel and it always thinks the sortAscending
Attribute is true.  

2.  When the Command Link is clicked to sort a Column for the very first
time the Facelets version calls methods on the Backing Bean while the JSP
version doesn't in the RestoreView phase.  Namely setSortColumn() and
setSortAscending().

 

 

 

I was wondering if somebody could point me where to look in the code next. 

 

Any help would be appreciated,

 

Tom


Mime
View raw message