Class 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 Link onClick 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 Detail

      • TableComponentAsXlsHandler

        public TableComponentAsXlsHandler​(Component tableComponent,
                                          String filename)
        Parameters:
        tableComponent -
        filename -
    • Method Detail

      • newSheet

        protected org.apache.poi.ss.usermodel.Sheet newSheet()
        Create the sheet in where component table data will be set
        Returns:
        a new Sheet to receive the table component data