Class FIXGRIDHtmlExporter
java.lang.Object
org.eclnt.jsfserver.elements.util.FIXGRIDHtmlExporter
- All Implemented Interfaces:
IFIXGRIDHtmlExporter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected StringaddTable()protected voidcloseHtmlTable(StringBuffer html) protected voidexportBodyBegin(StringBuffer html, FIXGRIDBinding fixgrid) protected voidexportBodyCol(StringBuffer html, FIXGRIDBinding fixgrid, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci, List<String> row, int rowCounter, int colCounter) protected voidexportBodyEnd(StringBuffer html, FIXGRIDBinding fixgrid) protected voidexportBodyRows(StringBuffer html, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<List<String>> data) protected voidexportFooterRow(StringBuffer html, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<String> row, int rowCounter) protected voidexportFooterRows(StringBuffer html, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns) exportGridToHtml(FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<List<String>> data, boolean selctedItemsOnly) protected voidexportHeaderRow(StringBuffer html, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<String> row, int rowCounter) protected voidexportHeaderRows(StringBuffer html, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns) protected voidexportTitle(StringBuffer html, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<List<String>> data) protected StringfindAlignmentForDataCell(int rowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) protected StringfindAlignmentForHeaderCell(int rowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column) protected StringfindBackgroundColorForFooterCell(int rowCounter, String string, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo columnInfo) protected StringfindBackgroundColorForHeaderCell(int rowCounter, String string, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo columnInfo) protected StringfindBackgroundtForDataCell(int i, String string, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo columnInfo) protected StringfindCellValue(FIXGRIDBinding fixgrid, int rowCounter, int colCounter, List<String> row, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci) Central value for retrieving the value of a cell.protected StringfindStyleForBodyCol(FIXGRIDBinding fixgrid, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci, List<String> row, int rowCounter, int colCounter) protected StringfindStyleForFooterCol(FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<String> row, int rowCounter, int colCounter) protected StringfindStyleForHeaderCol(FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<String> row, int rowCounter, int colCounter) protected StringfindTextColorForDataCell(int i, String string, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo columnInfo) protected StringfindTextColorForFooterCell(int rowCounter, String string, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo columnInfo) protected StringfindTextColorForHeaderCell(int rowCounter, String string, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo columnInfo) Resource path of the template that is used for building the "basic HTML page" into which the table content is placed.protected voidopenHtmlTable(StringBuffer html) readFooterRows(FIXGRIDBinding fixgrid) readHeaderRows(FIXGRIDBinding fixgrid) protected Stringprotected StringvoidsetGridTitle(String gridTitle) Setting of title text that is printed before the grid.voidsetStyleClassDataCell(String styleClassDataCell) voidsetStyleClassDataTable(String styleClassDataTable) voidsetStyleClassFooterCell(String styleClassFooterCell) voidsetStyleClassHeaderCell(String styleClassHeaderCell) voidsetTemplatePath(String templateName)
-
Constructor Details
-
FIXGRIDHtmlExporter
public FIXGRIDHtmlExporter()
-
-
Method Details
-
getGridTitle
-
setGridTitle
Description copied from interface:IFIXGRIDHtmlExporterSetting of title text that is printed before the grid.- Specified by:
setGridTitlein interfaceIFIXGRIDHtmlExporter
-
getStyleClassDataTable
-
setStyleClassDataTable
-
getStyleClassDataCell
-
setStyleClassDataCell
-
getStyleClassHeaderCell
-
setStyleClassHeaderCell
-
getTemplatePath
Resource path of the template that is used for building the "basic HTML page" into which the table content is placed. The template is loaded by the class loader. -
setTemplatePath
-
exportGridToHtml
public String exportGridToHtml(FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<List<String>> data, boolean selctedItemsOnly) - Specified by:
exportGridToHtmlin interfaceIFIXGRIDHtmlExporter
-
readTemplate
-
exportBodyRows
protected void exportBodyRows(StringBuffer html, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<List<String>> data) -
exportBodyBegin
-
exportBodyEnd
-
exportBodyCol
protected void exportBodyCol(StringBuffer html, FIXGRIDBinding fixgrid, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci, List<String> row, int rowCounter, int colCounter) -
findStyleForBodyCol
protected String findStyleForBodyCol(FIXGRIDBinding fixgrid, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci, List<String> row, int rowCounter, int colCounter) -
findCellValue
protected String findCellValue(FIXGRIDBinding fixgrid, int rowCounter, int colCounter, List<String> row, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci) Central value for retrieving the value of a cell. By default the value of the exported String information is used. You may override this method in order to embed own HTML text content.
Please pay attention: String values must be ensured to only contain sanitized information (in order to e.g. prevent injection of JavaScript code. The methodsanitizeCellContentString(String)is tranferring all "dangerous" characters into there HTML-representations. Use this method, too, for sanitzing content that you may pass in your version of this method - or, in case of really passing complex HTML content: ensure that this content is sanitized in some different way. -
openHtmlTable
-
closeHtmlTable
-
exportHeaderRows
protected void exportHeaderRows(StringBuffer html, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns) -
exportHeaderRow
protected void exportHeaderRow(StringBuffer html, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<String> row, int rowCounter) -
findStyleForHeaderCol
protected String findStyleForHeaderCol(FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<String> row, int rowCounter, int colCounter) -
readHeaderRows
-
exportTitle
protected void exportTitle(StringBuffer html, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<List<String>> data) -
sanitizeCellContentString
-
findAlignmentForHeaderCell
-
findAlignmentForDataCell
-
findTextColorForDataCell
-
findBackgroundtForDataCell
-
findTextColorForHeaderCell
-
findBackgroundColorForHeaderCell
-
addTable
-
addBodyTr
-
addBodyTd
-
addHeaderTr
-
addHeaderTh
-