Package org.wicketstuff.poi.excel
Class TableComponentAsXlsHandler
- java.lang.Object
-
- org.wicketstuff.poi.excel.TableComponentAsXlsHandler
-
- All Implemented Interfaces:
IRequestHandler
public class TableComponentAsXlsHandler extends Object implements IRequestHandler
Request handler that respond the specified table component as a XLS file.
An possible
LinkonClick method implementation seting this handler could be:public void onClick() {
IRequestHandler handler = new TableComponentAsXlsHandler( table, "fileName.xls");
RequestCycle.get().scheduleRequestHandlerAfterCurrent(handler);
}- Author:
- Pedro Santos
-
-
Constructor Summary
Constructors Constructor Description TableComponentAsXlsHandler(Component tableComponent, String filename)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddetach(IRequestCycle requestCycle)protected org.apache.poi.ss.usermodel.SheetnewSheet()Create the sheet in where component table data will be setvoidrespond(IRequestCycle requestCycle)voidsetCellExporter(CellExporter cellExporter)Set the exporter strategy to be used by this handler.
-
-
-
Method Detail
-
respond
public void respond(IRequestCycle requestCycle)
- Specified by:
respondin interfaceIRequestHandler
-
detach
public void detach(IRequestCycle requestCycle)
- Specified by:
detachin interfaceIRequestHandler
-
newSheet
protected org.apache.poi.ss.usermodel.Sheet newSheet()
Create the sheet in where component table data will be set- Returns:
- a new
Sheetto receive the table component data
-
setCellExporter
public void setCellExporter(CellExporter cellExporter)
Set the exporter strategy to be used by this handler. The default isGeneralPurposeExporter- Parameters:
cellExporter-- See Also:
CellExporter
-
-