For working with the workbook in the subclass, see Apache's POI site
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract void | buildExcelDocument(Map<String, Object>
the model Map model, Workbook the Excel workbook to populate workbook, HttpServletRequest in case we need locale etc. Shouldn't look at attributes. request, HttpServletResponse in case we need to set cookies. Shouldn't write to it. response)Application-provided subclasses must implement this method to populate the Excel workbook document, given the model. |
| protected Workbook | Returns: the newWorkbook instancethe model Map model, HttpServletRequest current HTTP request (for taking the URL or headers into account) request)Template method for creating the POI |
| protected boolean | generatesDownloadContent()
Overrides org. Return whether this view generates download content (typically binary content like PDF or Excel files). |
| protected final void | renderMergedOutputModel(Map<String, Object>
combined output Map (never model, HttpServletRequest null),
with dynamic values taking precedence over static attributescurrent HTTP request request, HttpServletResponse current HTTP response response)Implements abstract org. Renders the Excel view, given the specified model. |
| protected void | renderWorkbook(Workbook
the POI Workbook to render workbook, HttpServletResponse current HTTP response response)The actual render step: taking the POI |
| AbstractXlsView | back to summary |
|---|---|
| public AbstractXlsView() Default Constructor. Sets the content type of the view to "application/vnd.ms-excel". | |
| buildExcelDocument | back to summary |
|---|---|
| protected abstract void buildExcelDocument(Map<String, Object> model, Workbook workbook, HttpServletRequest request, HttpServletResponse response) throws Exception Application-provided subclasses must implement this method to populate the Excel workbook document, given the model.
| |
| createWorkbook | back to summary |
|---|---|
| protected Workbook createWorkbook(Map<String, Object> model, HttpServletRequest request) Template method for creating the POI The default implementation creates a traditional | |
| generatesDownloadContent | back to summary |
|---|---|
| protected boolean generatesDownloadContent() Overrides org. Doc from org. Return whether this view generates download content (typically binary content like PDF or Excel files). The default implementation returns
| |
| renderMergedOutputModel | back to summary |
|---|---|
| protected final void renderMergedOutputModel(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception Implements abstract org. Renders the Excel view, given the specified model.
| |
| renderWorkbook | back to summary |
|---|---|
| protected void renderWorkbook(Workbook workbook, HttpServletResponse response) throws IOException The actual render step: taking the POI
| |