Methods
-
getCallback(tableDefName, event){function}
-
Returns a callback function that is registered to a gentable related exit event.
Name Type Description tableDefNameString 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!eventString 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 tableDefNameString 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 tableDefNameString 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!typeString 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 tableDefNameString 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!typeString 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 tableDefNameString 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!titleString 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 tableDefNameString 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!eventString the name of the event referenced as
<function>or<event>in the xml configuration file or one of the valid identifiers listed belowGentable.beforeRenderGentable.afterRenderGentable.beforeStore(optionally cancels the gentable store and file edit commit action if callbackfnreturnsfalse)Gentable.afterStoreGentable.afterRowSelectGentable.cellFormatterGentable.rowStyleGentable.comparatorsfnfunction 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 documentsContextDocumentsContext the
DocumentsContextpassed in the functionoptionsObject the options passed in the function
Name Type Description fileTypeNameString the technical name of the file type
gentableDefinitionNameString rowdocuments.sdk.gentable.grid.GentableGridRowModel [optional] the current grid row model
originalEventString [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 tableDefNameString 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!typeString cellEditorfunction doby-grid editor constructor
- Since:
- 5.0a
-
registerGridCellRenderer(tableDefName, type, cellRenderer)
-
Registers a grid cell renderer.
Name Type Description tableDefNameString 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!typeString cellRendererfunction Function returning a html string
- Since:
- 5.0a
-
registerGridColumnAggregator(tableDefName, title, columnAggregator)
-
Registers a column aggregator.
Name Type Description tableDefNameString 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!titleString title in the gentable field definition
columnAggregatorfunction Function returning a doby-grid column aggregator
- Since:
- 5.0c