AsyncDataProvider, Paging and CellTable

139 views
Skip to first unread message

Soon Fatt Hoo

unread,
Apr 12, 2011, 3:38:06 PM4/12/11
to gwt-table-to-excel
I am using AsyncDataProvider, Paging with CellTable.

I put the following code with my UiBinding screen

TableToExcelClient tableToExcelClient = new
TableToExcelClient(cellTable, exportToExcelSheetButton);

Added the <inherits
name="com.googlecode.gwtTableToExcel.gwtTableToExcel" /> to
my .gwt.xml and also the servlet to my web.xml. I am able to get the
excel file by clicking on exportToExcelSheetButton but it only show
current page data. Are there any ways for me to display all datas?

Thanks
Soon

Francois Wauquier

unread,
Apr 13, 2011, 2:49:25 AM4/13/11
to gwt-table...@googlegroups.com
Hi

The key point of gwt-table-to-excel is that it only export what is visible on the screen.
If it were only a paging problem, you could remove the paging just before the export, by adding a ClikHanlder on your exportToExcelSheetButton.

A simple rule could be "don't add a pager when you want to export", but i am not sure that would be satisfying.

But, i think i can improve that by adding:
-preExportCommand : allows to remove paging and start an async call
-preExportCallBack : allows to notify the callback success and start export with complete datas
-postExportCommand : allows to go back to previous paging.
Does that sound ok for you ?

Francois Wauquier

Soon Fatt Hoo

unread,
Apr 13, 2011, 9:35:13 AM4/13/11
to gwt-table-to-excel
I looked at your code, you added the ClickHandler in your
TableToExcelClient when I pass in my exportToExcelSheetButton. I
thought we couldn't have two ClickHandler(I could be wrong)? The
proposed solution sounds good to me, might need helps from you on how
to use it though. :) Thank you so much!

Francois Wauquier

unread,
Apr 13, 2011, 9:59:15 AM4/13/11
to gwt-table...@googlegroups.com
Hi

It is possible to have multiple ClickHandler for a single button and the adding order matter in that case.
I'll start with the 3 step proposed.
Could you fill an issue for that ?

Francois Wauquier

Soon Fatt Hoo

unread,
Apr 13, 2011, 1:58:00 PM4/13/11
to gwt-table-to-excel
Done. Thanks again for the help.
> Could you fill an issue for that ?http://code.google.com/p/gwt-table-to-excel/issues<http://code.google.com/p/gwt-table-to-excel/issues/entry?template=Def...>
>
> Francois Wauquier

Francois Wauquier

unread,
Apr 13, 2011, 2:12:54 PM4/13/11
to gwt-table...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages