Method is the operation used to calculate some summary function from objects to the table header. The command (a / command) is called for each loaded string. Result should be placed to the attributes, not object! result functin returns the result from calculation

Supported fields (only the fields from this list and fields defined in this interface are used):

enabled - when returns false method is not evaluated

  • Right is evaluated globally and does not get any object, obj is undefined
  • enabled has defined attribut rowCount = number of loaded rows
  • Evaluated everytime when table is reloaded - can e.g. react to the number of rows
  • Usage example: block method on the mobile devices or when too many field is calculated

right - evaluated only once; when returns false, method is disabled until next table open

  • Right is evaluated globally and does not get any object, obj is undefined

  • a / command - command to evaluate

  • obj object is new for each line - do not store any value to the obj

  • object methods are evaluated before evaluation the table operations - they can be used during evaluation

  • attributes are the same for each object and the function should use them to store results

  • attributes are cleared between methods - value calculated by methods cannot be used ouside the methods

  • Available attributes:

    • rowCount - total number of rows in the table (the same for all rows)
    • rowIndex - index of the processed object (change for each row)
interface iTableMethod {
    _hint?: string;
    _right: any;
    _tooltip?: string;
    _translation?: string;
    a?: string;
    attributes?: iAttributes;
    autoSel?: "all" | "none";
    browsing?: boolean;
    command?: iCommandData | iCommandData[];
    confirm?: string | boolean;
    confirmTitle?: string;
    enabled?: string;
    extends?: string;
    filter?: string;
    icon?: string;
    init?: string | string[];
    label?: string | boolean;
    listRight?: string;
    multi?: number | boolean;
    name: string;
    noSelectOper?: string;
    order?: string;
    readonlyenabled?: boolean;
    result: string;
    right?: string;
    save?: boolean;
    shortcut?: string;
    slow?: boolean;
    style?: string | object;
    uright?: string;
}

Hierarchy (view full)

Properties

_hint?: string
_right: any

Result of the right evaluation - used only internally!

_tooltip?: string
_translation?: string
a?: string

optional shorter versin of the command description

attributes?: iAttributes

List of optional attributes related with the command operation; Never mixed with the command attributes

autoSel?: "all" | "none"

Optional mark for multi-operation. If user select nothing, operation select all or nothing and starts Mark make sense only in pair with multi:true

browsing?: boolean

Optional command for list object to support browsing objects using buttons shfifButtonLeft / Right Functionality is always supported for common operation but not for others. @example: "openDetail":{ "multi":false, "browsing":true, "a":"form.this.detail"}

confirm?: string | boolean

name of the string used to confirm the operation (actually supportedy only for delete)

confirmTitle?: string

Optional title for confirmation dialog (used in par with confirm)

enabled?: string

evaluated condition that can confirm, if operation is allowed. If list of strings is used, each element should be string and all strings are joined with && AND operator Use object to get inheritance of conditions from extnted base operation Note string[] type is desabled because it is converted to the string by preproceson on enter and ale later types uses only string

extends?: string

Optinal parent operation. If defined all attributes from the parent operation, that are not defined in this operation are copied to this.

  • Operation works recursivelly
  • Multiple inheritance is not supported
filter?: string

Optional filter string - if set, operation is not a regular operation but filter Warning: not used by list of objects - they have more sophisticated filters than this

icon?: string
init?: string | string[]

Optional initalisation of the object variables or attributes before first call.

  • If not called, nothing is prepared!
  • Recomendation: set value to 0 or something else than undefined
  • Result of init value is ignored; it shall set attributes using attr. = ....
label?: string | boolean

Optinonal commands about label false - no label is printed string - string to translate (used instead of fieldname) true - does not affects functionality (useless) evaluaated - (=obj.enumVal('x')) --- should return translated value, result is not translated. Remember that obj is empty (nevertheless defined) for new object

listRight?: string

Optional right settings for list. If operation has button in the list commandLine, listRight is used instead of button

  • Remember: list right has evaluation object from parent!
  • listRight is not used for button in the line - these are using common right
multi?: number | boolean

Sign how many attributes operation requests

  • true = operation accepts multiple attributes,
  • 1 = operation requests exactly one attriuber,
  • 0 = operations doesn't work with attributes
name: string
noSelectOper?: string

Optional operation used in case that primary operation requires selection, but user does not select anything

Used only by list-defined operations; makes no sense and is disregarded for buttons in detail or clip (even in clipList)

order?: string

optional element order

readonlyenabled?: boolean

mark that operation is availabled even for readonly object; by default it is not evaluated

result: string

Reuquired method that return value including description! If not defined, result of the calcuation is not presented Function is called after processing the last object and result is placed to the table header When result returns false nothing is prestented -> can be used to show value only in some cases

right?: string

optional setting of the right to use operation.

Used in conjunction with

  • enabled - if set both, user should have boeth
  • uright - if both defined, user should have both
save?: boolean

Optional command for detail window to save the changesw before operation

Ignored by all other windows except univDetail - details opened by form..detail...

shortcut?: string

Optional shortcut starting the operation

slow?: boolean

Mark that operation is slow and can take longer time to process

style?: string | object

className (in case thet style is string) or list of styles using htmlelements.style JS attributes

Example

style='box--dataImportant'  box--dataImportant should be defined class in the css styles

Example

syle={"maxWidth":"20em"}    set up the maxWidth style attribute for the box

Example

styl={"border":"=obj.status=='AC'?'solid':'none' "}
uright?: string