dundas.Command Class

A command that can be shown in toolbars and menus, and executes an action.
 

Inheritance Hierarchy

 
Class
   dundas.EventDisposable
      dundas.Command
         dundas.BindingTileCommand
         dundas.ContextMenuCommand
         dundas.UndoableCommand
 

Constructors

 
  Name Description
init Constructs a command.
 
 

Properties

 
  Name Description
action Gets or sets the action to be executed for this command.
caption Gets or sets the caption of this command.
categoryName Gets or sets the category name of this command.
cssClass Gets or sets a custom CSS class that can be applied to the command element.
data Storage for this command.
description Gets or sets the description of this command.
id Gets the ID of this command.
imageUrl Gets or sets the image URL of this command.
invalidReason Gets or sets the value to describe why this command is marked as invalid.
isActionAsync Gets a value indicating whether or not the action is an async function.
isActionCollapse Gets or sets a value defining whether the toolbar will collapse when the command is executed.
isDisposed Gets a value indicating whether this instance has been disposed. Inherited from dundas.EventDisposable.
isEnabled Gets or sets whether this command is enabled.
isTogglable Gets or sets whether toggle is enabled for this command.
isToggled Gets or sets whether this command is toggled.
isValid Gets or sets a value indicating whether the command is valid.
sortOrder Gets or sets the sort order for this command for insertion into toolbars and menus.
subCommands Gets or sets the sub commands of this command.
toggleGroup Gets or sets what toggle group this command is part of (for use as radio button).
uiCache Gets the UI cache table Inherited from dundas.EventDisposable.
 
 

Methods

 
  Name Description
bind Bind an event to this class object. Inherited from dundas.EventDisposable.
dispose Disposes of the command. Inherited from dundas.EventDisposable.
execute Execute the action.
fromJObject Applies the property values from a plain object created from JSON to the properties of this instance. Inherited from Class.
notifyCommandExecuted
raiseBindEvent Fire the event specified with eventName, or subscribe a handler. Inherited from dundas.EventDisposable.
subscribe Subscribe or unsubscribe an event handler for an event. Inherited from dundas.EventDisposable.
subscribeDisposed Subscribe to the disposed event. Inherited from dundas.EventDisposable.
subscribeIsEnabledChanged Subscribe an event handler for IsEnabled event change. Handler to subscribe or unsubscribe.(Optional) True to unsubscribe. (Optional) True to subscribe a one time handler.
subscribeOnce Subscribe a one time event handler for an event. Inherited from dundas.EventDisposable.
toJSON Implementation for toJSON to return an object that will include this class's prototype property values when stringified. Inherited from Class.
trigger Raise an event. Inherited from dundas.EventDisposable.
unbind Unsubscribe an event. if handler is specified, unsubscribe that handler. if no parameters are specified, unbind everything. Inherited from dundas.EventDisposable.
unbindAll unsubscribe all events. Inherited from dundas.EventDisposable.
 
 

Examples