Class FIXGRIDHtmlExporter

java.lang.Object
org.eclnt.jsfserver.elements.util.FIXGRIDHtmlExporter
All Implemented Interfaces:
IFIXGRIDHtmlExporter

public class FIXGRIDHtmlExporter extends Object implements IFIXGRIDHtmlExporter
  • Constructor Details

    • FIXGRIDHtmlExporter

      public FIXGRIDHtmlExporter()
  • Method Details

    • getGridTitle

      public String getGridTitle()
    • setGridTitle

      public void setGridTitle(String gridTitle)
      Description copied from interface: IFIXGRIDHtmlExporter
      Setting of title text that is printed before the grid.
      Specified by:
      setGridTitle in interface IFIXGRIDHtmlExporter
    • getStyleClassDataTable

      public String getStyleClassDataTable()
    • setStyleClassDataTable

      public void setStyleClassDataTable(String styleClassDataTable)
    • getStyleClassDataCell

      public String getStyleClassDataCell()
    • setStyleClassDataCell

      public void setStyleClassDataCell(String styleClassDataCell)
    • getStyleClassHeaderCell

      public String getStyleClassHeaderCell()
    • setStyleClassHeaderCell

      public void setStyleClassHeaderCell(String styleClassHeaderCell)
    • getStyleClassFooterCell

      public String getStyleClassFooterCell()
    • setStyleClassFooterCell

      public void setStyleClassFooterCell(String styleClassFooterCell)
    • getTemplatePath

      public String 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

      public void setTemplatePath(String templateName)
    • exportGridToHtml

      public String exportGridToHtml(FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<List<String>> data, boolean selctedItemsOnly)
      Specified by:
      exportGridToHtml in interface IFIXGRIDHtmlExporter
    • readTemplate

      protected String readTemplate()
    • exportBodyRows

      protected void exportBodyRows(StringBuffer html, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<List<String>> data)
    • exportBodyBegin

      protected void exportBodyBegin(StringBuffer html, FIXGRIDBinding fixgrid)
    • exportBodyEnd

      protected void exportBodyEnd(StringBuffer html, FIXGRIDBinding fixgrid)
    • 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 method sanitizeCellContentString(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

      protected void openHtmlTable(StringBuffer html)
    • closeHtmlTable

      protected void closeHtmlTable(StringBuffer html)
    • 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)
    • exportFooterRows

      protected void exportFooterRows(StringBuffer html, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns)
    • exportFooterRow

      protected void exportFooterRow(StringBuffer html, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<String> row, int rowCounter)
    • findStyleForFooterCol

      protected String findStyleForFooterCol(FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<String> row, int rowCounter, int colCounter)
    • readFooterRows

      protected List<List<String>> readFooterRows(FIXGRIDBinding fixgrid)
    • readHeaderRows

      protected List<List<String>> readHeaderRows(FIXGRIDBinding fixgrid)
    • exportTitle

      protected void exportTitle(StringBuffer html, FIXGRIDBinding fixgrid, List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> columns, List<List<String>> data)
    • sanitizeCellContentString

      protected String sanitizeCellContentString(String s)
    • findAlignmentForHeaderCell

      protected String findAlignmentForHeaderCell(int rowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column)
    • findAlignmentForDataCell

      protected String findAlignmentForDataCell(int rowIndex, String dataCellValue, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo column)
    • findTextColorForDataCell

      protected String findTextColorForDataCell(int i, String string, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo columnInfo)
    • findBackgroundtForDataCell

      protected String findBackgroundtForDataCell(int i, String string, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo columnInfo)
    • findTextColorForHeaderCell

      protected String findTextColorForHeaderCell(int rowCounter, String string, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo columnInfo)
    • findBackgroundColorForHeaderCell

      protected String findBackgroundColorForHeaderCell(int rowCounter, String string, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo columnInfo)
    • findTextColorForFooterCell

      protected String findTextColorForFooterCell(int rowCounter, String string, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo columnInfo)
    • findBackgroundColorForFooterCell

      protected String findBackgroundColorForFooterCell(int rowCounter, String string, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo columnInfo)
    • addTable

      protected String addTable()
    • addBodyTr

      protected String addBodyTr()
    • addBodyTd

      protected String addBodyTd()
    • addHeaderTr

      protected String addHeaderTr()
    • addFooterTr

      protected String addFooterTr()
    • addHeaderTh

      protected String addHeaderTh()
    • addFooterTh

      protected String addFooterTh()