MenuItem
MenuItem
A presentation layer menu item.
Properties
alt : booleanModifies the keyCode attribute with the Alt Key. Overrides UIEvent behavior.
If True, the MenuItem can be accessed with the key specifed in keyCode and all modifiers. If the UIEvent is specified in the event property, the alt property overrides the settings of the UIEvents alt property. This property is only meaningful if the keyCode property is set.- Example
"<alt>P" - keyCode 112
cached : booleanTrue if the query should be allowed to be cached. False if the query should not be cached.
caption : stringString indentifier for caption display in the UI. Overrides the event (UIEvent) caption, if an event is specified.
collection : stringIf blank, the MenuItem isn't data driven. Otherwise, the menu will be dynamically driven from the collection specified here.
An expression that specifies that a collection model must be set on the control.- Example
"" (empty string, or null) - all instances of the associated class for Forms and form controls. No collection for other controls like MenuItems.
(@@ ClassName) - all instances of the class specified by ClassName
(ControlName1 assoc1 ... assocN) ... (ControlNameM assoc1 ... assocX) - all instances filtered by the parent instances.
@ assoc1 ... assocN) - variant of above example. All instances relative to the Form model.
collectionAnnotation : stringSpace separated list of annotations which do not exist in the Domain Model.
collectionCaption : stringCaption bind for data-driven MenuItems. Must be an attribute of the MenuItem's collection.
collectionIcon : stringThe attribute that is used to drive the icon in the dynamic MenuItem.
collectionLazy : booleanLoad the collection on display, not when the screen is loaded.
If true, the query for the dynamic menu will only be executed when the menu is displayed. Otherwise, the menu will be loaded when the screen is loaded.collectionOrderBy : stringOptional order by clause to be added to the MenuItem query: ((attr1 . asc1) ... (attrN . ascN)).
List of attributes or attribute and boolean pairs to indicate ascending (true) or descending (false).- Example
((name . #t) (company . #f))
collectionQuery : stringList of additional attributes to include in collection read query.
collectionTooltip : stringTooltip bind for data-driven MenuItems. Must be an attribute of the MenuItem's collection.
collectionValue : stringValue bind for data-driven MenuItems. Must be an attribute of the MenuItem's collection.
Passed as parameter to the UIEvent, if specified.collectionWhere : stringOptional clause to be added to collection model query.
ctrl : booleanModifies the keyCode attribute with the Ctrl Key. Overrides UIEvent behavior.
If True, the MenuItem can be accessed with the key specified in keyCode and all modifiers. If a UIEvent is specified in the even property, the ctrl property overrides the settings of the UIEvents ctrl property. This property is only meaningful if the keyCode property is set.- Example
"<ctrl>P" - keyCode 112
detail : booleanDisplay current instance only from the collection.
event : stringUIEvent to raise when this MenuItem is selected. UIEvents are handled by UIActions.
exclusive : booleanIf true lack of selection means disabling children collection query. Otherwise, children query is generated.
icon : stringIcon for the MenuItem. Overrides the event (UIEvent) icon, if an event is specified.
keyCode : stringASCII Value. MenuItem can be accessed with the key plus the alt, ctrl and shift modifiers. Overrides UIEvent behavior.
- Example
"112" for the letter P
name : identifierUniquely identifies the MenuItem.
Valid values based on“string”. :?[\p{L}_][\p{L}\p{N}_]*(:[\p{L}_][\p{L}\p{N}_]*)* Value must begin with a letter or an underscore. Case and length are not restricted. Letters, numbers and underscores are allowed. Colon is used as a scope separator. Spaces and other punctuation characters are not allowed.
query : stringList of additional attributes to include in read query.
radio : booleanValid for data-driven MenuItems. If true, the MenuItem won't generate an event if it is re-selected.
read : stringCustom read event. [<class>]'<event> <arg1> ... <argN>
Specification: [<class>]'<event> <arg1> ... <argN>
<class> is an optional class symbol. When omitted ActiveNode's class is used. <event> is a read event symbol. <arg#> is an event argument value which can be either a constant or a scheme expression evaluating to a constant at run-time on the client, using special local variables provided by the framework: this (=controller), :node (=active node), :attributes, :where, :orderBy, :count, :offset, :xlock, or a UI initializer variable.
If arguments are not specified, a default list is supplied by the framework: :attributes :where :orderBy :count :offset :xlock
Examples:
a) Generate a request to 'readList event with default arguments: readList
b) Generate request to readList event with attributes, and orderBy argument values supplied by the framework. readList :attributes :orderBy
c) Generate request to Contact'readDetail with attributes supplied by the framework, and the contact argument calculated using (current-contact) client library function. Contact'readDetail :attributes (current-contact this :node)
In a library: (define (current-contact controller node) ... )
d) Generate request to 'read event with a constant attribute list: read '(lastName firstName) :where :orderBy :count :offset :xlockshift : booleanModifies the keyCode attribute with the Shift Key. Overrides UIEvent behavior.
If True, the MenuItem can be accessed with the key specified in keyCode and all modifiers. If a UIEvent is specified in the even property, the ctrl property overrides the settings of the UIEvents ctrl property. This property is only meaningful if the keyCode property is set.- Example
"<shift>P" - keyCode 112
showCaption : booleanWhether to display caption for the MenuItem.
showDownArrow : booleanWhether to display a down arrow for the MenuItem. This property is only valid for menu items that are not configured with a collection model.
If True, a down arrow is rendered to the right of the menu caption / icon. If the menu item has child entries configured then clicking on the arrow will present users with a drop-down showing the child entries otherwise it will do nothing, even if the menu item has a UIEvent configured.showIcon : booleanWhether to display the icon for the MenuItem.
tooltip : stringTooltip for the MenuItem. Overrides the event (UIEvent) tooltip, if an event is specified.
Content
Sequence of:
Parents
MenuItem - A presentation layer menu item.
MenuItem
A presentation layer menu item.MenuLink
A presentation layer menu link.Separator
A presentation layer separator element.
Parent topic: Application_Menus_Menu
Parent topic: MenuItem
Parent topic: Form_Menus_Menu
Parent topic: references
Parent topic: Screen_Menus_Menu