GWC Template Language Reference / Template Paths - Window hierarchy |
Path: window/menu
Snippet ID: Menu
Corresponding AUI Tree element: Menu
The Menu is a unique sub-object of Window object that represent the main menu of the application. This object will only exist if the current window is handling a MENU statement. In all other cases including DIALOG statements, the window is handling a Dialog object
This object value is rendered thru the Menu snippet when invoked in a gwc:replace or gwc:content instruction.
Fields (Attributes) | Type | Description |
---|---|---|
CID | Attribute (string) | The corresponding component identifier. |
type | Attribute (string) | Type name of the component, that is Menu. |
idle | Object | A Idle object when the ON IDLE instruction is used. |
text | Attribute (string) | Menu title. |
style[ attribute-name ] | Attribute (string) | This selectable path will return the given attribute value inherited for this window. |
decorationstyle[ attribute-name ] | Collection of DecorationStyleItem objects | This selectable path will return the given attribute value DecorationStyleItem object for this object. This object gives access to all pseudo-selector values for the given attribute. |
decorationstyles | Collection of DecorationStylesItem objects | This path will return a DecorationStylesItem object for this window. This object gives access to all style attributes. |
class | Attribute (string) | Corresponds to the attribute STYLE value. |
image | Attribute (string) | Image associated to the Menu. |
comment | Attribute (string) | Comment associated to the Menu. |
actions | Collection of Action objects | The list of all actions available Used in a repeat instruction to loop on each window in the list. |
actions/length | Attribute (number) | Number of items in the collection. |
action[ action-name ] | Object | the Action named action-name |
visibleActions | Collection of Action objects | The list of actions available that do not have an explicit Action View (as TopMenu commands or Toolbar commands, for instance). This is a sub-list of the actions one. Used in a repeat instruction to loop on each actions in the list. |
visibleActions/length | Attribute (number) | Number of items in the collection. |
contextMenu | Attribute (string) | Corresponds to the CONTEXTMENU attribute in 4GL. |
<div gwc:omit-tag="true" gwc:condition="application/ui/window/menu" gwc:repeat="var application/ui/window/menu/actions"> <span gwc:condition="var/hasFocus" gwc:content="var/text" /> </div>
Display the name of the action that has the focus.