Constructors
| Name | Type | Description |
|---|---|---|
title |
string |
the title of the Ext table |
dataGadgetConfig |
GadgetConfig |
the gadgetConfig for the gadget to be called when the table retrieves its data |
- Deprecated
- Use ScriptList with otris.gadget.gui.ScriptListWrapper instead
Extends
Methods
-
inherited addClientFunction(clientFunction)
-
Adds a JavaScript Function to this Transferable Object. When the Object is transfered to the client the functions added to this Object will be available on the client side.
Name Type Description clientFunctionfunction The function to be added to the clientFunctions of this Object. (Can be a JavaScript Function or an Object returned by otris.gadget.util.FunctionUtils.getFunctionObject)
-
addColumnDef(def, index)
-
Add a column definition to the table. A column
definition can contain detailed settings for single
columns.Name Type Description defColumnDefinition column definition object
indexnumber optional the index of the column to specify the defintion for (if omitted, a new column is appended)
Example
// this will set all currently supported // column settings table.addColumnDef({ header: "FirstName", dataIndex: "firstName", minWidth: 100, maxWidth: 250 },2); -
inherited addContainerButton(buttonConfig){object}
-
Adds a container button.
If the gadget is displayed in a dialog the container buttons are rendered as dialog buttons (bottom right corner of the dialog).
Otherwise the container buttons are ignoredName Type Description buttonConfigobject button config object
Name Type Default Description idstring button id
labelstring button label
clickFunctionstring name of the client function to execute on click
disabledboolean false optional - Since:
- Documents 5.0e
Returns:
Type Description object buttonConfig Example
// Alternative gadget action button gadgetForm.addContainerButton({ id: "myCustomSaveButton", label: "Speichern", clickFunction: "saveGadgetData" }); gadgetForm.addClientFunction(function saveGadgetData(event) { var gForm = documentsContext.getGadgetContext().getClientObject(); gForm.submitForm({ gadgetAction: "processForm" }, { showBusyPanel: true }); }); -
addHandler(event, handler)
-
Adds a handler function to this Ext table which will be fired when the given event is triggered
Name Type Description eventstring the event which fires the handler
handlerfunction the handler function
-
inherited addPdfButton(config)
-
Adds a button to download the displayed gadget as pdf. The button will show on hover in the left top corner of the gadget.
Name Type Description configobject optional config object
Name Type Default Description filenamestring content.pdf optional filename of the pdf for download
buttonStylestring left: 200px; optional style for the pdf button to be applied to
- Since:
- Documents 5.0d
Example
myGadget.addPdfButton({filename: "myCustomFilename.pdf", buttonStyle: "left: 200px; }); -
inherited addSettings(option)
-
Adds a setting (an option that can be defined by the user) to the gadget.
Name Type Description optionGadgetSetting | Array.<GadgetSetting> the setting(s) to add to the gadget.
- Since:
- Documents 5.0a
-
inherited onGadgetLoad(onloadHandler)
-
Sets an onLoad handler for the Gadget. The handler is executed when the gadget is displayed at the client.
Name Type Description onloadHandlerfunction | string the handler to be executed (must be either a javascript function or a string representing a function)
-
onUpdate(handler)
-
Adds a handler function to the table which is called each time the table has been edited by the user.
The handler is passed an Array of entries currently in the tableName Type Description handlerfunction the handler to call
-
setAddEmptyRow(addEmptyRow)
-
Sets whether or not an empty row should be added to the end of the table so that
new entries can be added by simply editing the last empty row. (default: true)
This option only has an effect if the table is editable.Name Type Description addEmptyRowboolean -
setColumnDefaults(def)
-
Set a default column defintion with settings to use for all columns
Name Type Description defColumnDefinition column definition object to use as the default
- See:
-
- addColumnDef
-
setColumnStyle(columnStyle)
-
Sets a css Style for all columns in the table
Name Type Description columnStylestring the new columnStyle
-
inherited setContainerButtons(containerButtonConfigs)
-
Set the container buttons.
Please note that existing default buttons are removed by this operation.Name Type Description containerButtonConfigsArray.<object> array of button config objects
Name Type Default Description idstring button id
labelstring button label
clickFunctionstring name of the client function to execute on click
disabledboolean false optional - Since:
- Documents 5.0e
-
inherited setContextData(contextData)
-
Set additional data which is serialized with
JSON.stringify()and then transferred to the client
On the client side the the context data is accessible with theGadgetContextName Type Description contextDataany the context data
- Since:
- Documents 5.0c
Example
var htmlGadget = new otris.gadget.gui.HTML("<h1>Only a simple example</h1>"); var myGadgetData = { mySpecialId: 44137, myIndexArray: [1,7,6,3,2], myTitle: "A special GadgetTitle" }; htmlGadget.setContextData(myGadgetData); -
setDataGadgetConfig(dataGadgetConfig)
-
Sets the gadgetConfig Object for retrieving the data
Name Type Description dataGadgetConfigGadgetConfig the new config object
-
setDataIndex(dataIndex)
-
Sets the dataIndex of the Ext table
Name Type Description dataIndexArray.<string> an array containing the names of the properties for the columns. This name is used to retrieve the value for the current cell from the result returned by the dataScript.
-
setDataParams(dataParams)
-
Sets additional parameters which should be passed to the dataAction each time the data is retrieved
Name Type Description dataParamsobject a JavaScript Object containing each parameter as a property.
-
setDataStoreId(dataStoreId)
-
Sets the dataStoreId for the data store of this table. Data of this table can later be aquired on the clientside using this id.
By default the dataStoreId is set to the gadgetId of the gadget.Name Type Description dataStoreIdstring the new dataStoreId
-
setDisableSearch(disableSearch)
-
Sets whether or not the search field should be disabled (default: true)
Name Type Description disableSearchboolean -
setEditable(editable)
-
Sets whether or not the entries of the table should be editable (default: false)
Name Type Description editableboolean -
setFitColumns(fit)
-
Fit column widths to the width of the table? (default: true)
Name Type Description fitboolean fit column widths to table?
-
setHeader(header)
-
Sets the headers of the Ext table
Name Type Description headerArray.<string> array of new column headings
-
setHeight(height)
-
Sets the height of the Ext table
Name Type Description heightnumber the height (in Pixels) of the table
-
setHideFirstCol(hideFirstCol)
-
Name Type Description hideFirstColboolean - See:
-
- setHideFirstColumn
-
setHideFirstColumn(hideFirstCol)
-
Sets whether or not the first column of the table should be hidden
Name Type Description hideFirstColboolean -
inherited setNavibarEntry(gadgetConfig, label)
-
Add a navibar entry. Define a gadgetConfig that reloads the gadget.
Only works if the gadget ist displayed in main list view area.Name Type Description gadgetConfigobject gadgetConfig
labelstring optional label for the navibar entry (defaults to the gadget title)
- Since:
- Documents 5.0e
-
setPageSize(pageSize)
-
Sets the page size
Name Type Description pageSizenumber the new page size (amount of entries displayed on one page)
-
setRemoteSort(remoteSort)
-
Sets whether or not the sorting of the table should be handled by the dataScript
Name Type Description remoteSortboolean -
setShowBottomToolbar(show)
-
Sets whether or not the table should habe a bottom toolbar
Name Type Description showboolean -
setShowCheckboxes(showCheckboxes)
-
Sets whether or not a column with a checkbox should be shown on each line so that rows can be selected
Name Type Description showCheckboxesboolean -
setShowTopToolbar(show)
-
Sets whether or not the table should habe a top toolbar
Name Type Description showboolean -
inherited setStyle(name, value)
-
Sets a style attribute of the html container
Name Type Description namestring the name of the style parameter (i.e. "height")
valuestring the value of the style parameter (i.e. "100px")
-
inherited setTitle(title)
-
Sets the Title of the Form
Name Type Description titlestring the title of the form (will be displayed as the window header on dashboards)
-
setWidth(width)
-
Sets the width of the Ext table
Name Type Description widthnumber the width (in Pixels) of the table
-
inherited store(key, value)
-
Stores data that can later be accessed on client side.
ATTENTION: The store used in this method is global.
UsesetContextDatato store data for this gadget instance.Name Type Description keystring the key to store the data
valueany the value, or object that should be stored
-
transfer()
-
Make this object ready for beeing transferred to the client