-
1. Re: ExtendedDataTable own sorting
ilya_shaikovsky Mar 2, 2010 6:19 AM (in response to eugenbesel)define sortBy as there http://livedemo.exadel.com/richfaces-demo/richfaces/extendedDataTable.jsf and comparator to implement custom sorting. -
2. Re: ExtendedDataTable own sorting
eugenbesel Mar 2, 2010 7:25 AM (in response to ilya_shaikovsky)Hello Ilja,
I thought about something like I send the request to database and let database sort the data values.
I think it can be a bit faster then sorting in code.
so I think SortBy is not correct way.
how do you think?
-
3. Re: ExtendedDataTable own sorting
ilya_shaikovsky Mar 2, 2010 7:34 AM (in response to eugenbesel)Then implement the model which will be responsible for that. (full demo sources in SVN)
-
4. Re: ExtendedDataTable own sorting
eugenbesel Mar 7, 2010 11:03 AM (in response to ilya_shaikovsky)hello Ilja,
I tried to implement DataModel, but something is wrong in my code:
I took the example from:
http://eclecticprogrammer.com/2008/06/25/sorting-and-paginating-in-the-database-with-richfaces/
I attached my code.
the problem is that
The Methods update and walk work strange.
when in the method update some fields are setted, and then I go to walk-method, then these setted fields have still the old value, like the setter didnt work.
do you know this behavior?????
I try to set the attribute detached and sortField in the update method. but when I come to walk-method, they are not updated.WHY???
-
MyDataTable.java.zip 1.6 KB
-
dataTable.xhtml 2.7 KB
-
-
5. Re: ExtendedDataTable own sorting
eugenbesel Mar 8, 2010 3:15 AM (in response to eugenbesel)This is very strange behavior.
all attributes I setted or modified in the methode update have an old value in the method walk and other methods like getter and setter.
I tried to set this attributes into session. then I have the modified values also in other methods. but I think it is not a correct way.
does anybody know anithing about this update method.
1. On which point in lifecycle is this method called.
2. the method walk is called very often. in which cases is this method called?
I tried to set the value of attribute for column in the walk method, but on the page the changes were not shown.
just after the next table update were the changes shown.