Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojox/grid/enhanced/plugins/exporter/_ExportWriter.js

  • Provides:

    • dojox.grid.enhanced.plugins.exporter._ExportWriter
  • Requires:

    • dojox.grid.enhanced.plugins.Exporter in common
  • dojox.grid.enhanced.plugins.exporter._ExportWriter

    • type
      Function
    • parameters:
      • writerArgs: (typeof object)
        Any implementation of this class might accept a writerArgs object (optional),
        which contains some writer-specific arguments given by the user.
    • summary
      This is an abstract class for all kinds of writers used in the Exporter plugin.
      It utilizes the strategy pattern to break the export work into several stages,
      and provide interfaces for all of them.
      Implementations might choose some of the functions in this class to override,
      thus providing their own functionalities.
      The Exporter will go through the grid line by line. So in every line, all the Views
      will be reached, and the header line is only handled once.
      An *argObj* object is passed to most functions of this class.
      It carries context arguments that make sense when they are called.
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.argObj

    • type
      Object
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.argObj.grid

    • type
      EnhancedGrid
    • summary
      The grid object we are now handling.
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.argObj.isHeader

    • type
      bool
    • summary
      Indicating which context we're handling, header or content.
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.argObj.view

    • type
      _View
    • summary
      Reference to the current _View object.
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.argObj.viewIdx

    • type
      int
    • summary
      The index of the current _View object in the views array.
      If the grid does not have any rowselector view, it conforms to the index
      in the _ViewManager.views.
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.argObj.subrow

    • type
      _View.structure.cells[i]
    • summary
      Reference to the current subrow.
      A subrow describe the innter structure of a row in a view, it's an array of cells
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.argObj.subrowIdx

    • type
      int
    • summary
      The index of the current subrow in the subrow array: _View.structure.cells.
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.argObj.cell

    • type
      dojox.grid.__CellDef
    • summary
      Reference to the current cell.
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.argObj.cellIdx

    • type
      int
    • summary
      The index of the current cell in the current subrow.
      It's different from cell.index, which is the index in the whole line.
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.argObj.row

    • type
      item
    • summary
      The current row of data (logically), a.k.a.: current item.
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.argObj.rowIdx

    • type
      int
    • summary
      The index of the current row (item).
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.argObj.spCols

    • type
      Array<int>
    • summary
      An array of special column indexes(flat,not regarding structure).
      Special columns are typically attached to grid as a kind of UI facility
      by the grid widget, instead of some real data.
      For example, indirect selectors and row indexers.
      Users can choose to export it or not.
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.argObj.colOffset

    • type
      int
    • summary
      If the grid has a _RowSelector view or something else, this view will NOT be
      passed to the user in argObj. So the column index (cell.index) will appear shifted
      (start from 1 instead of 0). This colOffset is provided to remove this shift.
      usage:
      var correctColIndex = argObj.cell.index + argObj.colOffset;
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.constructor

    • constructor - constructor
    • type
      Function
    • parameters:
      • writerArgs: (typeof object)
        Any implementation of this class might accept a writerArgs object (optional),
        which contains some writer-specific arguments given by the user.
    • summary
      Writer initializations goes here.
  • dojox.grid.enhanced.plugins.exporter._ExportWriter._getExportDataForCell

    • parameters:
      • rowIndex
      • rowItem
      • cell
      • grid
    • type
      Function
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.beforeHeader

    • parameters:
      • grid: (typeof EnhancedGrid)
    • returns
      Boolean
    • summary
      We are going to start the travel in the grid.
      Is there anything we should do now?
    • tags: extension return: true: go on hanling the header row and then call afterHeader. false: skip the header row, won't call afterHeader.
    • type
      Function
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.afterHeader

    • summary
      The header line has been handled.
    • tags: extension
    • return_summary
      undefined
    • type
      Function
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.beforeContent

    • parameters:
      • items: (typeof Array)
        All the items fetched from the store
        return:
        true: go on handling the contents and then call afterContent.
        false: skip all the contents, won't call afterContent.
    • returns
      Boolean
    • summary
      We are ready to go through all the contents(items).
    • tags: extension
    • type
      Function
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.afterContent

    • summary
      We have finished the entire grid travel.
      Do some clean up work if you need to.
    • tags: extension
    • return_summary
      undefined
    • type
      Function
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.beforeContentRow

    • parameters:
      • argObj: (typeof object)
        An object with at least the following context properties available:
        {
        grid,isHeader,
        row,rowIdx,
        spCols
        }
        return:
        true: go on handling the current data row and then call afterContentRow.
        false: skip the current data row, won't call afterContentRow.
    • returns
      Boolean
    • summary
      Before handling a line of data (not header).
    • tags: extension
    • type
      Function
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.afterContentRow

    • parameters:
      • argObj: (typeof object)
        An object with at least the following context properties available:
        {
        grid,isHeader,
        row,rowIdx,
        spCols
        }
    • summary
      After handling a line of data (not header).
    • tags: extension
    • return_summary
      undefined
    • type
      Function
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.beforeView

    • parameters:
      • argObj: (typeof object)
        An object with at least the following context properties available:
        {
        grid,isHeader,
        view,viewIdx,
        spCols(if isHeader==false)
        }
        return:
        true: go on handling the current view and then call afterView.
        false: skip the current view, won't call afterView.
    • returns
      Boolean
    • summary
      Before handling a view.
    • tags: extension
    • type
      Function
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.afterView

    • parameters:
      • argObj: (typeof object)
        An object with at least the following context properties available:
        {
        grid,isHeader,
        view,viewIdx,
        spCols(if isHeader==false)
        }
    • summary
      After handling a view.
    • tags: extension
    • return_summary
      undefined
    • type
      Function
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.beforeSubrow

    • parameters:
      • argObj: (typeof object)
        An object with at least the following context properties available:
        {
        grid,isHeader,
        row,rowIdx,
        view,viewIdx,
        subrow,subrowIdx,
        spCols(if isHeader==false)
        }
        return:
        true: go on handling the current subrow and then call afterSubrow.
        false: skip the current subrow, won't call afterSubrow.
    • returns
      Boolean
    • summary
      Before handling a subrow in a line (defined in the grid structure).
    • tags: extension
    • type
      Function
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.afterSubrow

    • parameters:
      • argObj: (typeof object)
        An object with at least the following context properties available:
        {
        grid,isHeader,
        row,rowIdx,
        view,viewIdx,
        subrow,subrowIdx,
        spCols(if isHeader==false)
        }
    • summary
      Before handling a subrow in a line (defined in the grid structure).
    • tags: extension
    • return_summary
      undefined
    • type
      Function
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.handleCell

    • parameters:
      • argObj: (typeof object)
        An object with at least the following context properties available:
        {
        grid,isHeader,
        row,rowIdx,
        view,viewIdx,
        subrow,subrowIdx,
        cell,cellIdx,
        spCols(if isHeader==false)
        }
    • summary
      Handle a header cell or data cell.
    • tags: extension
    • return_summary
      undefined
    • type
      Function
  • dojox.grid.enhanced.plugins.exporter._ExportWriter.toString

    • returns
      String
    • summary
      Export to a string.
    • tags: extension
    • return_summary
      The exported result string.
    • type
      Function
  • dojox.grid.enhanced.plugins.exporter

    • type
      Object
  • dojox.grid.enhanced.plugins

    • type
      Object
  • dojox.grid.enhanced

    • type
      Object
  • dojox.grid

    • type
      Object
  • dojox

    • type
      Object