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 clientFunction
function 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 def
ColumnDefinition column definition object
index
number 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 buttonConfig
object button config object
Name Type Default Description id
string button id
label
string button label
clickFunction
string name of the client function to execute on click
disabled
boolean 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 event
string the event which fires the handler
handler
function 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 config
object optional config object
Name Type Default Description filename
string content.pdf optional filename of the pdf for download
buttonStyle
string 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 option
GadgetSetting | 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 onloadHandler
function | 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 handler
function 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 addEmptyRow
boolean -
setColumnDefaults(def)
-
Set a default column defintion with settings to use for all columns
Name Type Description def
ColumnDefinition 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 columnStyle
string the new columnStyle
-
inherited setContainerButtons(containerButtonConfigs)
-
Set the container buttons.
Please note that existing default buttons are removed by this operation.Name Type Description containerButtonConfigs
Array.<object> array of button config objects
Name Type Default Description id
string button id
label
string button label
clickFunction
string name of the client function to execute on click
disabled
boolean 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 theGadgetContext
Name Type Description contextData
any 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 dataGadgetConfig
GadgetConfig the new config object
-
setDataIndex(dataIndex)
-
Sets the dataIndex of the Ext table
Name Type Description dataIndex
Array.<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 dataParams
object 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 dataStoreId
string the new dataStoreId
-
setDisableSearch(disableSearch)
-
Sets whether or not the search field should be disabled (default: true)
Name Type Description disableSearch
boolean -
setEditable(editable)
-
Sets whether or not the entries of the table should be editable (default: false)
Name Type Description editable
boolean -
setFitColumns(fit)
-
Fit column widths to the width of the table? (default: true)
Name Type Description fit
boolean fit column widths to table?
-
setHeader(header)
-
Sets the headers of the Ext table
Name Type Description header
Array.<string> array of new column headings
-
setHeight(height)
-
Sets the height of the Ext table
Name Type Description height
number the height (in Pixels) of the table
-
setHideFirstCol(hideFirstCol)
-
Name Type Description hideFirstCol
boolean - See:
-
- setHideFirstColumn
-
setHideFirstColumn(hideFirstCol)
-
Sets whether or not the first column of the table should be hidden
Name Type Description hideFirstCol
boolean -
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 gadgetConfig
object gadgetConfig
label
string optional label for the navibar entry (defaults to the gadget title)
- Since:
- Documents 5.0e
-
setPageSize(pageSize)
-
Sets the page size
Name Type Description pageSize
number 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 remoteSort
boolean -
setShowBottomToolbar(show)
-
Sets whether or not the table should habe a bottom toolbar
Name Type Description show
boolean -
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 showCheckboxes
boolean -
setShowTopToolbar(show)
-
Sets whether or not the table should habe a top toolbar
Name Type Description show
boolean -
inherited setStyle(name, value)
-
Sets a style attribute of the html container
Name Type Description name
string the name of the style parameter (i.e. "height")
value
string the value of the style parameter (i.e. "100px")
-
inherited setTitle(title)
-
Sets the Title of the Form
Name Type Description title
string 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 width
number 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.
UsesetContextData
to store data for this gadget instance.Name Type Description key
string the key to store the data
value
any the value, or object that should be stored
-
transfer()
-
Make this object ready for beeing transferred to the client