A boolean which istrue
if the menu has any executable menu items, false
if not.
Context associated with the menu. If commandParameter
is not specified on a menu item, it is passed the menuContext
itself upon invocation. If commandParameter
is specified, it is passed to the specified command.
If commandParameter
has properties with string value tokens in the format of {{SomeProperty}}
, these properties will
be resolved against properties of the menuContext
itself.
The description of this menu.
The unique ID of the menu.
Menu items associated with this menu.
The source view which has currently invoked this menu, or the view to which this menu 'belongs.
The title of this menu, which may be used for presentation purposes.
Menu items that are currently executable or are currently non-executable but have their "hideOnDisable" setting set to false.
The default menu context parameter name.
Applies menu context changes to all items in the menu.
Handle the canExecute for a single menu item changing without recalculating the whole menu
When the collection changes, we'll need to decide how to handle the elements. Removals and clears remove from the executable list, Additions need only re execute canExecuteChanged to decide whether to display or not.
Indicate the type of change made to the menu items.
Binds a handler to an Observable or to a dojo.connect. Binding to an Observable:
``` this.auto(someObservable, function (newValue) { });
with explicit scope:
this.auto(someObservable, this, function (newValue) { });
Alternately, pass an event name as a string to use dojo.connect:
this.auto(window, "onclick", function () { }); ```
Either an Observable (for observable bindings) or a regular object (if arg1 is a string)
If arg0 is an Observable, a function or scope object. Otherwise, an event name (to use with dojo.connect).
If arg0 is an Observable, a function handler.
This function executes when the canExecute
of any of the menu items changes, or a new element is added to the list.
Destroys the object completely
Disposes any bindings tracked by this object.
Gets a language resource from the Application's resource dictionary, given a key, and optional locale. Returns null if the resource does not exist.
The locale of the resource to fetch. Defaults to the current application locale.
Initializes this menu view model based on the provided configuration
The configuration for this menu view model
Clean up when this menu view model is destroyed
Retrieves the menu for this view model from the menu registry and sets it up. This is done only when the view requests it as part of it's attach routine.
the id of the menu to set up this view model for. If omitted, this.menuId property must already be set.
Whether to resolve the executable status of menu items now, or attempt to do so when the menu is viewed. Defaults to true.
If 'resolveCanExecute' is false this should be set. When this view is activated the menu items will resolve.
Tracks a subscription to an {@link geocortex.framework.commands.Command}, disposing it when this object is disposed with the destroy method.
Tracks a subscription to an {@link geocortex.framework.events.Event}, disposing it when this object is disposed with the destroy method.
Holds information and state about an instance of a particular menu.