incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DI Kurt Edegger <edeg...@telbiomed.at>
Subject Re: Default sort of <tr:table/>
Date Wed, 25 Oct 2006 14:55:04 GMT
Ok, thank you a lot for your help and hints!

Enjoy, Kurt

Brian Smith schrieb:
> I have not tried what you are doing, but you not going to be able to 
> avoid a
> table binding.  You will have to call methods of the table directly in your
> backing bean to force this behavior.
> 
> On 10/25/06, DI Kurt Edegger <edegger@telbiomed.at> wrote:
>>
>> Sorry, but how do I call the setSortCriteria() method of the table?
>>
>> I do have a <tr:table value="#{pagedList}" var="task"/> in my xhtml file
>> and I'd love to avoid the need of using a binding to a table object.
>> The #{pagedList} returns a java.util.List and implements the required
>> methods for the table (getSortCriteria, setSortCriteria and isSortable),
>> but these methods are called automatically by myFaces.
>>
>> It seems like a common feature to me, but maybe I'm wrong...
>>
>> Regards, Kurt
>>
>> Brian Smith schrieb:
>> > Try using the setSortCriteria() method of the table.  If you have not
>> done
>> > this already, you will have to create a CoreTable object in your 
>> backing
>> > bean and bind it to the component using the binding attribute of the
>> > tr:table on the jsp.  Then after you fill the list, try setting the
>> > setSortCriteria(List criteria).   Each element of List criteria must be
>> of
>> > type SortCriterion.
>> >
>> > On 10/25/06, DI Kurt Edegger <edegger@telbiomed.at> wrote:
>> >>
>> >> Hi Brian,
>> >>
>> >> thank you for your fast response. The list is sorted already, but the
>> >> front-end doesn't show the nice little arrow to indicate that the
>> column
>> >> is sorted and sortable.
>> >> The sorting arrows (ascending/descending) will only show up after the
>> >> first click on a table header.
>> >>
>> >> I'd like to have the look and feel consistent, right after the page is
>> >> displayed.
>> >>
>> >> Any ideas?
>> >>
>> >> Regards, Kurt
>> >>
>> >> Brian Smith schrieb:
>> >> > Can't you just sort your list/array when you load it?  If this is
>> >> database
>> >> > data, just sort it in the query.
>> >> >
>> >>
>> >>
>> >
>>

Mime
View raw message