Methods
-
getCallback(tableDefName, event){function}
-
Returns a callback function that is registered to a gentable related exit event.
Name Type Description tableDefName
String the gentable definition name(s) specified in the gentable xml configuration file by
<table_def name="">
, each separated by,
or*
for any definition name
Caution: This parameter is not a file type or archive type name!event
String the name of the event
- Since:
- 5.0a
- See:
Returns:
Type Description function the exit function (or callback) -
getDefinition(tableDefName){String}
-
Returns a register definition.
Name Type Description tableDefName
String the gentable definition name(s) specified in the gentable xml configuration file by
<table_def name="">
, each separated by,
or*
for any definition name
Caution: This parameter is not a file type or archive type name!- Since:
- 5.0a
Returns:
Type Description String -
getGridCellEditor(tableDefName, type){function}
-
Returns the cell editor with the given type.
Name Type Description tableDefName
String the gentable definition name(s) specified in the gentable xml configuration file by
<table_def name="">
, each separated by,
or*
for any definition name
Caution: This parameter is not a file type or archive type name!type
String Type in the gentable field definition
- Since:
- 5.0a
Returns:
Type Description function Valid doby-grid editor constructor -
getGridCellRenderer(tableDefName, type){function}
-
Returns the cell renderer with the given type.
Name Type Description tableDefName
String the gentable definition name(s) specified in the gentable xml configuration file by
<table_def name="">
, each separated by,
or*
for any definition name
Caution: This parameter is not a file type or archive type name!type
String type in the gentable field definition
- Since:
- 5.0a
Returns:
Type Description function Function returning a html string -
getGridColumnAggregator(tableDefName, title){function}
-
Returns the column aggregator for the give column.
Name Type Description tableDefName
String the gentable definition name(s) specified in the gentable xml configuration file by
<table_def name="">
, each separated by,
or*
for any definition name
Caution: This parameter is not a file type or archive type name!title
String title in the gentable field definition
- Since:
- 5.0a
Returns:
Type Description function Function returning a html string -
registerCallback(tableDefName, event, fn)
-
Registers a callback function that can be attached to a gentable related exit event.
Name Type Description tableDefName
String the gentable definition name(s) specified in the gentable xml configuration file by
<table_def name="">
, each separated by,
or*
for any definition name
Caution: This parameter is not a file type or archive type name!event
String the name of the event referenced as
<function>
or<event>
in the xml configuration file or one of the valid identifiers listed belowGentable.beforeRender
Gentable.afterRender
Gentable.beforeStore
(optionally cancels the gentable store and file edit commit action if callbackfn
returnsfalse
)Gentable.afterStore
Gentable.afterRowSelect
Gentable.cellFormatter
Gentable.rowStyle
Gentable.comparators
fn
function the function (or callback) that will be called if the exit event occurs
Notice: Any callback will be executed according to the function signature listed below.gentableCallback(documentsContext, options)
Name Type Description documentsContext
DocumentsContext the
DocumentsContext
passed in the functionoptions
Object the options passed in the function
Name Type Description fileTypeName
String the technical name of the file type
gentableDefinitionName
String row
documents.sdk.gentable.grid.GentableGridRowModel [optional] the current grid row model
originalEvent
String [optional] the current original dom event
- Since:
- 5.0a
Examples
documents.sdk.gentable.gentableRegistry.registerCallback("erpInvoice", "calculateTotal", function(documentsContext, options) { var gentableContext = documentsContext.getGentableContext(); var grid = gentableContext.getGridModel(); var row = options.row; });
documents.sdk.gentable.gentableRegistry.registerCallback("erpInvoice", "Gentable.beforeStore", function(documentsContext, options) { var grid = documentsContext.getGentableContext().getGridModel(); var validationSuccess = false; // perform some validation checks against the grid model data... if(!validationSuccess) { documentsContext.openMessageDialog("Error", "The invoice data is not valid!"); return false; // abort gentable store and file edit commit action } });
documents.sdk.gentable.gentableRegistry.registerCallback("erpOrder", "Gentable.afterRender", function(documentsContext, options) { var gentableContext = documentsContext.getGentableContext(); });
-
registerGridCellEditor(tableDefName, type, cellEditor)
-
Registers a grid cell editor.
Name Type Description tableDefName
String the gentable definition name(s) specified in the gentable xml configuration file by
<table_def name="">
, each separated by,
or*
for any definition name
Caution: This parameter is not a file type or archive type name!type
String cellEditor
function doby-grid editor constructor
- Since:
- 5.0a
-
registerGridCellRenderer(tableDefName, type, cellRenderer)
-
Registers a grid cell renderer.
Name Type Description tableDefName
String the gentable definition name(s) specified in the gentable xml configuration file by
<table_def name="">
, each separated by,
or*
for any definition name
Caution: This parameter is not a file type or archive type name!type
String cellRenderer
function Function returning a html string
- Since:
- 5.0a
-
registerGridColumnAggregator(tableDefName, title, columnAggregator)
-
Registers a column aggregator.
Name Type Description tableDefName
String the gentable definition name(s) specified in the gentable xml configuration file by
<table_def name="">
, each separated by,
or*
for any definition name
Caution: This parameter is not a file type or archive type name!title
String title in the gentable field definition
columnAggregator
function Function returning a doby-grid column aggregator
- Since:
- 5.0c