Class TablesComponentAsXlsHandler

  • All Implemented Interfaces:
    IRequestHandler

    public class TablesComponentAsXlsHandler
    extends Object
    implements IRequestHandler

    Request handler that respond the specified table components as a XLS file.

    A possible implementation of Link on click be:

    public void onClick() {
    IRequestHandler handler = new TablesComponentAsXlsHandler("fileName.xls", table1, table2);
    RequestCycle.get().scheduleRequestHandlerAfterCurrent(handler);
    }
    Author:
    reiern70
    • Constructor Detail

      • TablesComponentAsXlsHandler

        public TablesComponentAsXlsHandler​(String filename,
                                           Component... tableComponents)
        Parameters:
        filename -
        tableComponents -
    • Method Detail

      • newSheet

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