X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/2e847cf21b8ab9d15fa167b315ca5b2fa92638fc..e9397f91ede62d446aed37d23256e8938fc4c335:/docs/output/Ext.Action.html diff --git a/docs/output/Ext.Action.html b/docs/output/Ext.Action.html index b3e934ca..5448d0ed 100644 --- a/docs/output/Ext.Action.html +++ b/docs/output/Ext.Action.html @@ -1,74 +1,74 @@ -
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).
-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).
-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(){
- Ext.Msg.alert('Click', 'You did something.');
- },
- iconCls: 'do-something',
- itemId: 'myAction'
-});
-
-var panel = new Ext.Panel({
- title: 'Actions',
- width: 500,
- height: 300,
- tbar: [
- // Add the action directly to a toolbar as a menu button
- action,
- {
- text: 'Action Menu',
- // Add the action to a menu as a text item
- menu: [action]
- }
- ],
- items: [
- // Add the action to the panel body as a standard button
- new Ext.Button(action)
- ],
- renderTo: Ext.getBody()
-});
-
-// Change the text for all components using the action
-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 | Defined By | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
disabled : Boolean True to disable all components using this action, false to enable them (defaults to false). | Action | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
handler : Function The function that will be invoked by each component tied to this action
-when the component's primary event is trigge... The function that will be invoked by each component tied to this action
-when the component's primary event is triggered (defaults to undefined). | Action | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hidden : Boolean True to hide all components using this action, false to show them (defaults to false). | Action | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
iconCls : String The CSS class selector that specifies a background image to be used as the header icon for
-all components using this... The CSS class selector that specifies a background image to be used as the header icon for
-all components using this action (defaults to '').
- An example of specifying a custom icon class would be something like: -
| Action | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
itemId : String See Ext.Component.itemId. | Action | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
scope : Object The scope (this reference) in which the
+ Class Ext.Action
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). +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). +Example usage:+
Config Options
Public PropertiesThis class has no public properties. Public Methods
|