Wicket examples: repeaters

2013-01-20 Thread Lucio Crusca
Hello *,

I'm trying to understand repeaters and DataTable from WicketExamples. I'm 
definitely having a hard time...

http://www.wicket-library.com/wicket-examples-6.0.x/repeater/

The running example shows a nice table with sorting column headers. However 
looking at what pretends to be the corresponding source code, I can't find 
where the DataTablePage code adds the sorting table headers, nor where any 
third parties eventually refer to both DataTablePage and SortingPage, the 
latter being the only place where I see the headers being added. Likewise, 
DataTablePage is the only place where I see the CSV exporter being added, but 
the running example has both sorting columns and CSV exporter in the same 
table.

I've tried copying DataTable.java in my application and adapting it, but (as 
expected) the resulting table has no sorting headers, though it does use a 
SortableDataProvider (same provider being used by SortingPage).

Please help...


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket examples: repeaters

2013-01-20 Thread Sven Meier
DefaultDataTable uses a HeadersToolbar, which renders sortable headers 
*if* a column is sortable. For that the column has to return true from 
#isSortable() .


PropertyColumn supports sorting, but for that you have to provide a 
sortProperty. Note the third constructor argument:


columns.add(new PropertyColumnContact, String(new 
ModelString(Last Name), lastName, lastName)


Hope this helps
Sven

On 01/20/2013 01:35 PM, Lucio Crusca wrote:

Hello *,

I'm trying to understand repeaters and DataTable from WicketExamples. I'm
definitely having a hard time...

http://www.wicket-library.com/wicket-examples-6.0.x/repeater/

The running example shows a nice table with sorting column headers. However
looking at what pretends to be the corresponding source code, I can't find
where the DataTablePage code adds the sorting table headers, nor where any
third parties eventually refer to both DataTablePage and SortingPage, the
latter being the only place where I see the headers being added. Likewise,
DataTablePage is the only place where I see the CSV exporter being added, but
the running example has both sorting columns and CSV exporter in the same
table.

I've tried copying DataTable.java in my application and adapting it, but (as
expected) the resulting table has no sorting headers, though it does use a
SortableDataProvider (same provider being used by SortingPage).

Please help...


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org