X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/d41dc04ad17d1d9125fb2cf72db2b4782dbe3a8c..6b044c28b5f26fb99c86c237ffad19741c0f7f3d:/docs/output/Ext.Action.html?ds=sidebyside diff --git a/docs/output/Ext.Action.html b/docs/output/Ext.Action.html index 65860171..5448d0ed 100644 --- a/docs/output/Ext.Action.html +++ b/docs/output/Ext.Action.html @@ -1,24 +1,7 @@ -
-
- Properties - Methods - Events - Config Options - Direct Link -
-

Class Ext.Action

- - - - - -
Package:Ext
Defined In:Action.js
Class:Action
Extends:Object
-
- * -

An Action is a piece of reusable functionality that can be abstracted out of any particular component so that it +

Class Ext.Action

Package:Ext
Defined In:Action.js
Class:Action
Extends:Object

An Action is a piece of reusable functionality that can be abstracted out of any particular component so that it can be usefully shared among multiple components. Actions let you share handlers, configuration options and UI -updates across any components that support the Action interface (primarily Ext.Toolbar, Ext.Button -and Ext.menu.Menu components).

+updates across any components that support the Action interface (primarily Ext.Toolbar, Ext.Button +and Ext.menu.Menu components).

Aside from supporting the config object interface, any component that needs to use Actions must also support the following method list, as these will be called as needed by the Action class: setText(string), setIconCls(string), setDisabled(boolean), setVisible(boolean) and setHandler(function).

@@ -26,20 +9,22 @@ Example usage:
// Define the shared action.  Each component below will have the same
 // display text and icon, and will display the same message on click.
 var action = new Ext.Action({
-    text: 'Do something',
-    handler: function(){
+    text: 'Do something',
+    handler: function(){
         Ext.Msg.alert('Click', 'You did something.');
     },
-    iconCls: 'do-something'
+    iconCls: 'do-something',
+    itemId: 'myAction'
 });
 
 var panel = new Ext.Panel({
     title: 'Actions',
-    width:500,
-    height:300,
+    width: 500,
+    height: 300,
     tbar: [
         // Add the action directly to a toolbar as a menu button
-        action, {
+        action,
+        {
             text: 'Action Menu',
             // Add the action to a menu as a text item
             menu: [action]
@@ -53,403 +38,64 @@ Example usage:
}); // Change the text for all components using the action -action.setText('Something else');
- -
- -

Config Options

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Config OptionsDefined By
  - - disabled : Boolean
- True to disable all components using this action, false to enable them (defaults to false).
-
Action
  - - hidden : Boolean
- True to hide all components using this action, false to show them (defaults to false).
-
Action
  - - scope : Object
- The scope in which the handler function will execute.
-
Action
  - - text : String
- The text to set for all components using this action (defaults to '').
-
Action
- -

Public Properties

- - - - - - - - - - - - - - - -
PropertyDefined By
  - - isDisabled : Object
- Returns true if the components using this action are currently disabled, else returns false. Read-only.
-
Action
  - - isHidden : Object
- Returns true if the components using this action are currently hidden, else returns false. Read-only.
-
Action
- -

Public Methods

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MethodDefined By
- -

Public Events

-
This class has no public events.
-
\ No newline at end of file +action.setText('Something else'); + +// Reference an action through a container using the itemId +var btn = panel.getComponent('myAction'); +var aRef = btn.baseAction; +aRef.setText('New text');

Config Options

Config OptionsDefined By
 disabled : Boolean
True to disable all components using this action, false to enable them (defaults to false).
Action
 hidden : Boolean
True to hide all components using this action, false to show them (defaults to false).
Action
 itemId : StringAction
 scope : Object
The scope (this reference) in which the +handler is executed. Defaults to this Button.
Action
 text : String
The text to set for all components using this action (defaults to '').
Action

Public Properties

This class has no public properties.

Public Methods

MethodDefined By

Public Events

This class has no public events.
\ No newline at end of file