You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Marco <ma...@gmail.com> on 2006/01/10 13:41:34 UTC
Sorting dataTable
Hi Everybody;
Thanks a lot for last replies :)
I need to know the steps to make a dataTable sortable ?
Thanks a lot
Re: Sorting dataTable
Posted by Marco <ma...@gmail.com>.
You are right guys..the examples are more than perfect and everything is
working now
Thanks a lot for help and time :)
Re: Sorting dataTable
Posted by Marco <ma...@gmail.com>.
Thanks a lot
Re: Sorting dataTable
Posted by gr...@intellicare.com.
Marco <ma...@gmail.com> wrote on 01/10/2006 09:17:55 AM:
> No..I meant the sortable dataTable source (jsp, beans & config).
>
> Thanks
>
Beans:
src\examples\simple\src\java\org\apache\myfaces\examples\listexample\
jsps: src\examples\simple\
config: src\examples\simple\WEB-INF\
Geeta
Re: Sorting dataTable
Posted by Marco <ma...@gmail.com>.
No..I meant the sortable dataTable source (jsp, beans & config).
Thanks
Re: Sorting dataTable
Posted by gr...@intellicare.com.
Marco <ma...@gmail.com> wrote on 01/10/2006 09:02:08 AM:
> Can you please give me the URL ?
>
> Thanks a lot
>
You mean for the source? http://myfaces.apache.org/source.cgi will give
you the release version.. not sure if this is what you are asking..?
Regards,
Geeta
Re: Sorting dataTable
Posted by Marco <ma...@gmail.com>.
Can you please give me the URL ?
Thanks a lot
Re: Sorting dataTable
Posted by gr...@intellicare.com.
Marco <ma...@gmail.com> wrote on 01/10/2006 08:52:39 AM:
> OK
>
> I tried to do like the examples said but nothing worked..maybe
> because i did not have the source beans of the examples leaded me to
> misunderstanding.
>
> & i tired another way..
>
> This is what i thought..The header will be command link that has an
> action=" bean.sort", When i click the header I'll send the column
> value through the request params then read it by the method sort and
> perform the sort..but it does not work correctly :(
>
> Thanks
>
Hi Marco, why don't you have the source? You can download it..?
Regards,
Geeta
Re: Sorting dataTable
Posted by Marco <ma...@gmail.com>.
OK
I tried to do like the examples said but nothing worked..maybe because i did
not have the source beans of the examples leaded me to misunderstanding.
& i tired another way..
This is what i thought..The header will be command link that has an action="
bean.sort", When i click the header I'll send the column value through the
request params then read it by the method sort and perform the sort..but it
does not work correctly :(
Thanks
Re: Sorting dataTable
Posted by "R. Müller" <r....@unicomp-berlin.de>.
have a look at the examples ! but basically it depends on your
implementation of the backing bean - in which order you return the list
of rows ...
regards
ronald
Marco wrote:
> Hi Everybody;
>
> Thanks a lot for last replies :)
>
> I need to know the steps to make a dataTable sortable ?
>
> Thanks a lot
Re: Sorting dataTable
Posted by gr...@intellicare.com.
Marco <ma...@gmail.com> wrote on 01/10/2006 07:41:34 AM:
> Hi Everybody;
>
> Thanks a lot for last replies :)
>
> I need to know the steps to make a dataTable sortable ?
>
> Thanks a lot
>
As Ronald wrote, look at the examples first - they are pretty good. Also i
quote below what Simon wrote when I had trouble seeing what was needed:
The "sortColumn" attribute should point to a backing bean property that
is of type String. That property gets set (ie its setter gets called)
with the columnName value of whatever column the user chose to sort on.
The "sortAscending" attribute should point to a backing bean property
that is of type boolean. That property gets set to true/false when the
user clicks repeatedly on the same column header (ie sorts
asc/desc/asc/desc).
Your worklist.assignments method (ie the one referred to by the table's
"value" attribute) is then required to look at the backing bean's
properties that are the target of sortColumn and sortAscending and
return its list in the order specified by those (String, boolean)
properties.
If you are still having trouble, search this archive. About a week back
there was a long thread involving just this problem titled "Getting
sorting to work in data table -- header click does not call sort method"
and "Data Table Sorting still not working". There is code as well as
discussion there you may find useful.
Regards,
Geeta