UIAction Properties |
The UIAction type exposes the following members.
Name | Description | |
---|---|---|
![]() | Caption | |
![]() | ClickEvent |
Javascript function that is executed clientside when a user clicks the action.
The click event must be a function that receives an args object.
Example: "function(args) { alert('You clicked an action: ' + JSON.stringify(args)); }"
|
![]() | DataObjectTypeIds |
The user action is present in all views that display data objects of one of these types.
It is also present in the detail pages (dataobjdlg.aspx) for those views.
If one or more ViewIds are specified that criteria ("and") apply as well.
|
![]() | DefinedForAllDataObjectType |
Is true if a data object wildcard has been specified and no exclusions has been specified.
In other words - is true if DataObjectTypeIds contains ids of all data object types defined in the system.
|
![]() | DisplayEvaluator |
Javascript function that is executed clientside to evaluate whether or not to display the action to the user.
If Location is "Toolbar" the function is executed once when the page loads.
If Location is "ContextMenu" the function is executed every time an object is activated to display the context menu.
If the function is defined then it must return true in order for the action to be displayed in the page / for the activated object.
The evaluator must be a function that receives an args object.
Example: "function(args) { return true; }"
Can be null.
|
![]() | DisplayIn |
Display in list screens, details screens or both?
|
![]() | Id |
Id of the UIAction data object.
|
![]() | IsInvalid |
Is set during load - is used to ignore actions that eg. specify an invalid data object type.
|
![]() | IsSecondary |
Is it a secondary action? If so it is presented in a ... menu if the location is in a toolbar.
|
![]() | Location |
Where on a page should action item be displayed?
A list-toolbar action is executed on the selected objects in the list (but it may choose to ignore the selection).
A details-toolbar action is executed on the displayed object (but it may choose to ignore it).
A list-contextmenu action is always executed on a single (=the clicked) object.
|
![]() | MasterDataObjectTypes |
The action is displayed in the list pages that display master data of one of these types.
It is also present in the detail pages for those list pages.
It rarely makes sense to have MasterDataObjectTypes specified together with DataObjectTypeIds/ViewIds.
|
![]() | RequiredSelection |
Does the action require that one or more objects are selected?
The selection is validated when a user activates the action. If the criteria isn't met then the ClickEvent isn't executed.
The RequiredSelection is only considered for list toolbar actions and for details toolbar actions.
For a details toolbar action: if RequiredSelection != 'NoRequirement' the action is not displayed when creating a new object.
RequiredSelection is not used if Location is "ContextMenu".
Defaults to 'NoRequirement'.
|
![]() | RequireSingleTypeList |
Only present action in a list (view) that displays objects of a single type?
Only considered if DisplayIn==List and Location==Toolbar.
|
![]() | ViewExcludeIds |
The action will not be displayed in the specified views.
|
![]() | ViewIds |
The action is displayed in the specified views.
It is also displayed in the detail pages (dataobjdlg.aspx) for those views.
If one or more DataObjectTypeIds are specified that criteria ("and") apply as well.
|