You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Marcin Zajaczkowski <ms...@wp.pl> on 2007/12/28 15:36:31 UTC

[Tobago] Default sorting by the second column in

Hi,


Maybe my problem is a trivial one, but I was unable to find an answer.
I would like to have a table (sheet) sort by the second column by 
default (on a page load).
I've seen setSortedColumnId() method in SheetState class which could be 
somehow useful, but maybe there is an easier way to set key column 
directly in JSP?


Thanks for help
Marcin


Re: [Tobago] Default sorting by the second column in

Posted by Marcin Zajaczkowski <ms...@wp.pl>.
Hello Bernd,

On 29.12.2007 14:55, Bernd Bohmann wrote:
> maybe you can sort the List or Array after creating it.
> I don't know a way to sort a column on a page load.

I took a closer look at SheetState and I think it would be hard to add 
that option directly in JSP, because SheetState manages many properties.
I changed sortedColumnId and an arrow in a header started to be 
displayed, but it doesn't emit event to resort list. I had to sort a 
list "manually" after read it from a database (exactly as you suggested).


Regards
Marcin



> Marcin Zajaczkowski schrieb:
>> Hi,
>>
>>
>> Maybe my problem is a trivial one, but I was unable to find an answer.
>> I would like to have a table (sheet) sort by the second column by
>> default (on a page load).
>> I've seen setSortedColumnId() method in SheetState class which could be
>> somehow useful, but maybe there is an easier way to set key column
>> directly in JSP?
>>
>>
>> Thanks for help
>> Marcin


Re: [Tobago] Default sorting by the second column in

Posted by Bernd Bohmann <be...@atanion.com>.
Hello Marcin,

maybe you can sort the List or Array after creating it.
I don't know a way to sort a column on a page load.

Regards

Bernd

Marcin Zajaczkowski schrieb:
> Hi,
> 
> 
> Maybe my problem is a trivial one, but I was unable to find an answer.
> I would like to have a table (sheet) sort by the second column by
> default (on a page load).
> I've seen setSortedColumnId() method in SheetState class which could be
> somehow useful, but maybe there is an easier way to set key column
> directly in JSP?
> 
> 
> Thanks for help
> Marcin
> 
>