MultiTableOptionsHelper
Constructors
Constructor
new MultiTableOptionsHelper():
MultiTableOptionsHelper
Returns
MultiTableOptionsHelper
Properties
FUNCTION_PREFIX
staticFUNCTION_PREFIX:string
Methods
getColumnAttributeCallbackHandler()
staticgetColumnAttributeCallbackHandler<ReturnType>(callbackOrFunctionName):ColumnAttributeCallback<ReturnType>
Helper Funktion: Gibt das column Attribute als Funktion zurück
Type Parameters
ReturnType
ReturnType
Parameters
callbackOrFunctionName
ColumnAttributeCallbackHandler<ReturnType>
Returns
ColumnAttributeCallback<ReturnType>
triggerColumnCallback()
statictriggerColumnCallback<ReturnType>(options,columnName,key,row?,defaultValue?):string|ReturnType
Triggert den Callback
Type Parameters
ReturnType
ReturnType
Parameters
options
columnName
string
key
"allowEdit" | "allowInsert" | "visible" | "label" | "tooltip" | "type" | "field" | "sortable" | "defaultValue" | "required" | "validation" | "attributes" | "selectOnFocus" | "change" | "headerTemplate" | "footerTemplate" | "width" | "render" | "disableInternationalization" | "cellBackgroundColor"
row?
defaultValue?
ReturnType
Returns
string | ReturnType
triggerCallback()
statictriggerCallback<ReturnType>(callbackOrFunctionName,options,column?,row?,defaultValue?):string|ReturnType
Triggers a callback or function and returns the result
Type Parameters
ReturnType
ReturnType
Parameters
callbackOrFunctionName
ColumnAttributeCallbackHandler<ReturnType>
The callback or function name
options
The MultiTableOptions
column?
The MultiTableColumn
row?
The MultiTableRow
defaultValue?
ReturnType
The default value
Returns
string | ReturnType
The result of the callback or function
getLocaleValue()
staticgetLocaleValue(text,language?):string
Returns a localed value from a string (see https://otris.software/documents/api/portalscript/context.html#getLocaleValue)
Parameters
text
string
The value/label string like "de:Deutsch; en:English"
language?
string
Optional String with the locale (like "de"); if omitted, the options.language will be used or the current user's portal language.
Returns
string
The string in appropriate language.
stringify()
staticstringify(options):string
Wandelt ein MultiTableOptions Objekt in ein JSON-String um
Parameters
options
object | MultiTableOptions
Returns
string
getColumnTypeFromDBResultType()
staticgetColumnTypeFromDBResultType(dbType):MultiTableColumnTypes
Returns the column type based on the DBResultType
Parameters
dbType
The DBResultType
Returns
The MultiTableColumnTypes
getOptionsFromDatabase()
staticgetOptionsFromDatabase(query):Pick<MultiTableOptions,"columns"|"rows">
Returns a object providing columns and rows from a given SelectBuilder. It uses the columns alias or name as label and the type from the given type. If no columns are defined, it will use the first row to generate the columns.
Parameters
query
a SelectBuilder instance to get the rows and columns from
Returns
Pick<MultiTableOptions, "columns" | "rows">
The columns and rows