Click or drag to resize

UIAction Class

Represents an action item that renders as a toolbar button or context menu item in a web page.
Inheritance Hierarchy
SystemObject
  Omada.OE.Model.UIActionUIAction

Namespace:  Omada.OE.Model.UIAction
Assembly:  Omada.OE.Model (in Omada.OE.Model.dll) Version: 15.0.0.0
Syntax
C#
[SerializableAttribute]
public class UIAction : ICloneable

The UIAction type exposes the following members.

Constructors
  NameDescription
Public methodUIAction
Top
Properties
  NameDescription
Public propertyCaption
Public propertyClickEvent
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)); }"
Public propertyDataObjectTypeIds
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.
Public propertyDefinedForAllDataObjectType
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.
Public propertyDisplayEvaluator
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.
Public propertyDisplayIn
Display in list screens, details screens or both?
Public propertyId
Id of the UIAction data object.
Public propertyIsInvalid
Is set during load - is used to ignore actions that eg. specify an invalid data object type.
Public propertyIsSecondary
Is it a secondary action? If so it is presented in a ... menu if the location is in a toolbar.
Public propertyLocation
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.
Public propertyMasterDataObjectTypes
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.
Public propertyRequiredSelection
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'.
Public propertyRequireSingleTypeList
Only present action in a list (view) that displays objects of a single type? Only considered if DisplayIn==List and Location==Toolbar.
Public propertyViewExcludeIds
The action will not be displayed in the specified views.
Public propertyViewIds
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.
Top
Methods
  NameDescription
Public methodClone
Public methodToString
For debugging purposes.
(Overrides ObjectToString.)
Top
Extension Methods
  NameDescription
Public Extension MethodToBool
Converts object to boolean.
(Defined by ObjectExtensions.)
Public Extension MethodToDateTime
Converts object to DateTime.
(Defined by ObjectExtensions.)
Public Extension MethodToInt
Converts object to integer.
(Defined by ObjectExtensions.)
Top
See Also