Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / docs / api / Ext.Action.html
1 <!DOCTYPE html><html><head><title>Ext.Action | Ext JS 4.0 Documentation</title><script type="text/javascript" src="../ext-all.js"></script><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../scrollbars.css" type="text/css"><link rel="stylesheet" href="../docs.css" type="text/css"><link id="styleCss" rel="stylesheet" href="../style.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script><link rel="stylesheet" href="../prettify.css" type="text/css"><!-- link(rel: 'stylesheet', href: req.baseURL + '/css/ext4.css', type: 'text/css')--><link rel="shortcut icon" type="image/ico" href="../favicon.ico"><!--[if IE]>
2 <style type="text/css">.head-band { display: none; }
3 .header { border: 0; top: 0; left: 0px; background: url(../header.gif) repeat-x; }
4 .doc-tab .members .member a.more { background-color: #efefef; }
5 </style><link rel="stylesheet" href="/new/css/ie.css" type="text/css"><![endif]-->
6 </head><body id="ext-body" class="iScroll"><div id="notice" class="notice">For up to date documentation and features, visit 
7 <a href="http://docs.sencha.com/ext-js/4-0">http://docs.sencha.com/ext-js/4-0</a></div><div class="wrapper"><div class="head-band"></div><div class="header"><h2><a href="../index.html">Sencha Documentation</a></h2></div><div id="search"><form><input type="text" placeholder="Search" id="search-field" autocomplete="off" name="q"></form><div id="search-box"></div></div><div id="treePanel"></div><div id="container"><script type="text/javascript">
8
9     req = {
10         liveURL: '.',
11         standAloneMode: true,
12         origDocClass: 'Ext.Action',
13         docClass: 'Ext.Action',
14         docReq: 'Ext.Action',
15         version: '4.0',
16         baseURL: '.',
17         baseDocURL: '.',
18         baseProdURL: '.'
19     };
20
21     clsInfo = {};
22
23
24
25 </script>
26
27 <script type="text/javascript" src="../search.js"></script>
28 <!--script type="text/javascript" src="/new/javascripts/app/examples.js"></script-->
29 <script type="text/javascript" src="../class_tree.js"></script>
30 <script type="text/javascript" src="../class_doc.js"></script>
31 <script type="text/javascript">
32     req.source = 'Action.html#Ext-Action';
33     clsInfo = {"methods":["Action","disable","each","enable","execute","getIconCls","getText","hide","isDisabled","isHidden","setDisabled","setHandler","setHidden","setIconCls","setText","show"],"cfgs":["disabled","handler","hidden","iconCls","itemId","scope","text"],"properties":[],"events":[],"subclasses":[]};
34     Ext.onReady(function() {
35         Ext.create('Docs.classPanel');
36     });
37 </script><div id="top-block" class="top-block"><h1 id="clsTitle" class="cls"><a href="../source/Action.html#Ext-Action" target="_blank">Ext.Action</a></h1></div><div id="docContent"><div id="doc-overview-content"><div class="lft"><p>An Action is a piece of reusable functionality that can be abstracted out of any particular component so that it
38 can be usefully shared among multiple components.  Actions let you share handlers, configuration options and UI
39 updates across any components that support the Action interface (primarily <a href="Ext.toolbar.Toolbar.html" rel="Ext.toolbar.Toolbar" class="docClass">Ext.toolbar.Toolbar</a>, <a href="Ext.button.Button.html" rel="Ext.button.Button" class="docClass">Ext.button.Button</a>
40 and <a href="Ext.menu.Menu.html" rel="Ext.menu.Menu" class="docClass">Ext.menu.Menu</a> components).</p>
41
42
43 <p>Use a single Action instance as the config object for any number of UI Components which share the same configuration. The
44 Action not only supplies the configuration, but allows all Components based upon it to have a common set of methods
45 called at once through a single call to the Action.</p>
46
47
48 <p>Any Component that is to be configured with an Action must also support
49 the following methods:<ul>
50 <li><code>setText(string)</code></li>
51 <li><code>setIconCls(string)</code></li>
52 <li><code>setDisabled(boolean)</code></li>
53 <li><code>setVisible(boolean)</code></li>
54 <li><code>setHandler(function)</code></li></ul>.</p>
55
56
57 <p>This allows the Action to control its associated Components.</p>
58
59
60 <p>Example usage:<br></p>
61
62 <pre class="prettyprint"><code>// Define the shared Action.  Each Component below will have the same
63 // display text and icon, and will display the same message on click.
64 var action = new Ext.Action({
65     <a href="Ext.Action.html#text" rel="Ext.Action#text" class="docClass">text</a>: 'Do something',
66     <a href="Ext.Action.html#handler" rel="Ext.Action#handler" class="docClass">handler</a>: function(){
67         Ext.Msg.alert('Click', 'You did something.');
68     },
69     <a href="Ext.Action.html#iconCls" rel="Ext.Action#iconCls" class="docClass">iconCls</a>: 'do-something',
70     <a href="Ext.Action.html#itemId" rel="Ext.Action#itemId" class="docClass">itemId</a>: 'myAction'
71 });
72
73 var panel = new Ext.panel.Panel({
74     title: 'Actions',
75     width: 500,
76     height: 300,
77     tbar: [
78         // Add the Action directly to a toolbar as a menu button
79         action,
80         {
81             text: 'Action Menu',
82             // Add the Action to a menu as a text item
83             menu: [action]
84         }
85     ],
86     items: [
87         // Add the Action to the panel body as a standard button
88         new Ext.button.Button(action)
89     ],
90     renderTo: Ext.getBody()
91 });
92
93 // Change the text for all components using the Action
94 action.setText('Something else');
95
96 // Reference an Action through a container using the itemId
97 var btn = panel.getComponent('myAction');
98 var aRef = btn.baseAction;
99 aRef.setText('New text');
100 </code></pre>
101
102 <div class="members"><div class="m-cfgs"><div class="definedBy">Defined By</div><a name="configs"></a><h3 class="cfg p">Config Options</h3><h4 class="cfgGroup">CSS Class configs</h4><div id="config-iconCls" class="member f ni"><a href="Ext.Action.html#config-iconCls" rel="config-iconCls" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-cfg-iconCls" class="viewSource">view source</a></div><a name="iconCls"></a><a name="config-iconCls"></a><a href="Ext.Action.html#" rel="config-iconCls" class="cls expand">iconCls</a><span> : String</span></div><div class="description"><div class="short">The CSS class selector that specifies a background image to be used as the header icon for
103 all components configured ...</div><div class="long"><p>The CSS class selector that specifies a background image to be used as the header icon for
104 all components configured by this Action (defaults to '').</p>
105
106 <p>An example of specifying a custom icon class would be something like:
107 </p>
108
109
110 <pre><code>// specify the property in the config for the class:
111      ...
112      iconCls: 'do-something'
113
114 // css class that specifies background image to be used as the icon image:
115 .do-something { background-image: url(../images/my-icon.gif) 0 6px no-repeat !important; }
116 </code></pre>
117
118 </div></div></div><h4 class="cfgGroup">Other Configs</h4><div id="config-disabled" class="member f ni"><a href="Ext.Action.html#config-disabled" rel="config-disabled" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-cfg-disabled" class="viewSource">view source</a></div><a name="disabled"></a><a name="config-disabled"></a><a href="Ext.Action.html#" rel="config-disabled" class="cls expand">disabled</a><span> : Boolean</span></div><div class="description"><div class="short"><p>True to disable all components configured by this Action, false to enable them (defaults to false).</p>
119 </div><div class="long"><p>True to disable all components configured by this Action, false to enable them (defaults to false).</p>
120 </div></div></div><div id="config-handler" class="member ni"><a href="Ext.Action.html#config-handler" rel="config-handler" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-cfg-handler" class="viewSource">view source</a></div><a name="handler"></a><a name="config-handler"></a><a href="Ext.Action.html#" rel="config-handler" class="cls expand">handler</a><span> : Function</span></div><div class="description"><div class="short">The function that will be invoked by each component tied to this Action
121 when the component's primary event is trigger...</div><div class="long"><p>The function that will be invoked by each component tied to this Action
122 when the component's primary event is triggered (defaults to undefined).</p>
123 </div></div></div><div id="config-hidden" class="member ni"><a href="Ext.Action.html#config-hidden" rel="config-hidden" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-cfg-hidden" class="viewSource">view source</a></div><a name="hidden"></a><a name="config-hidden"></a><a href="Ext.Action.html#" rel="config-hidden" class="cls expand">hidden</a><span> : Boolean</span></div><div class="description"><div class="short"><p>True to hide all components configured by this Action, false to show them (defaults to false).</p>
124 </div><div class="long"><p>True to hide all components configured by this Action, false to show them (defaults to false).</p>
125 </div></div></div><div id="config-iconCls" class="member ni"><a href="Ext.Action.html#config-iconCls" rel="config-iconCls" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-cfg-iconCls" class="viewSource">view source</a></div><a name="iconCls"></a><a name="config-iconCls"></a><a href="Ext.Action.html#" rel="config-iconCls" class="cls expand">iconCls</a><span> : String</span></div><div class="description"><div class="short">The CSS class selector that specifies a background image to be used as the header icon for
126 all components configured ...</div><div class="long"><p>The CSS class selector that specifies a background image to be used as the header icon for
127 all components configured by this Action (defaults to '').</p>
128
129 <p>An example of specifying a custom icon class would be something like:
130 </p>
131
132
133 <pre><code>// specify the property in the config for the class:
134      ...
135      iconCls: 'do-something'
136
137 // css class that specifies background image to be used as the icon image:
138 .do-something { background-image: url(../images/my-icon.gif) 0 6px no-repeat !important; }
139 </code></pre>
140
141 </div></div></div><div id="config-itemId" class="member ni"><a href="Ext.Action.html#config-itemId" rel="config-itemId" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-cfg-itemId" class="viewSource">view source</a></div><a name="itemId"></a><a name="config-itemId"></a><a href="Ext.Action.html#" rel="config-itemId" class="cls expand">itemId</a><span> : String</span></div><div class="description"><div class="short"><p>See <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a>.<a href="Ext.Component.html#itemId" rel="Ext.Component#itemId" class="docClass">itemId</a>.</p>
142 </div><div class="long"><p>See <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a>.<a href="Ext.Component.html#itemId" rel="Ext.Component#itemId" class="docClass">itemId</a>.</p>
143 </div></div></div><div id="config-scope" class="member ni"><a href="Ext.Action.html#config-scope" rel="config-scope" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-cfg-scope" class="viewSource">view source</a></div><a name="scope"></a><a name="config-scope"></a><a href="Ext.Action.html#" rel="config-scope" class="cls expand">scope</a><span> : Object</span></div><div class="description"><div class="short"><p>The scope (<code><b>this</b></code> reference) in which the
144 <code><a href="Ext.Action.html#handler" rel="Ext.Action#handler" class="docClass">handler</a></code> is executed. Defaults to the browser window.</p>
145 </div><div class="long"><p>The scope (<code><b>this</b></code> reference) in which the
146 <code><a href="Ext.Action.html#handler" rel="Ext.Action#handler" class="docClass">handler</a></code> is executed. Defaults to the browser window.</p>
147 </div></div></div><div id="config-text" class="member ni"><a href="Ext.Action.html#config-text" rel="config-text" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-cfg-text" class="viewSource">view source</a></div><a name="text"></a><a name="config-text"></a><a href="Ext.Action.html#" rel="config-text" class="cls expand">text</a><span> : String</span></div><div class="description"><div class="short"><p>The text to set for all components configured by this Action (defaults to '').</p>
148 </div><div class="long"><p>The text to set for all components configured by this Action (defaults to '').</p>
149 </div></div></div></div><div class="m-methods"><a name="methods"></a><div class="definedBy">Defined By</div><h3 class="mth p">Methods</h3><div id="method-Action" class="member f ni"><a href="Ext.Action.html#method-Action" rel="method-Action" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-method-constructor" class="viewSource">view source</a></div><a name="Action"></a><a name="method-Action"></a><a href="Ext.Action.html#" rel="method-Action" class="cls expand">Action</a>(
150 <span class="pre">Object config</span>)
151  : void</div><div class="description"><div class="short"><p>&nbsp;</p></div><div class="long">
152 <h3 class="pa">Parameters</h3><ul><li><span class="pre">config</span> : Object<div class="sub-desc"><p>The configuration options</p>
153 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
154 </li></ul></div></div></div><div id="method-disable" class="member ni"><a href="Ext.Action.html#method-disable" rel="method-disable" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-method-disable" class="viewSource">view source</a></div><a name="disable"></a><a name="method-disable"></a><a href="Ext.Action.html#" rel="method-disable" class="cls expand">disable</a> : void</div><div class="description"><div class="short"><p>Disables all components configured by this Action.</p>
155 </div><div class="long"><p>Disables all components configured by this Action.</p>
156 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
157 </li></ul></div></div></div><div id="method-each" class="member ni"><a href="Ext.Action.html#method-each" rel="method-each" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-method-each" class="viewSource">view source</a></div><a name="each"></a><a name="method-each"></a><a href="Ext.Action.html#" rel="method-each" class="cls expand">each</a>(
158 <span class="pre">Function fn, Object scope</span>)
159  : void</div><div class="description"><div class="short">Executes the specified function once for each Component currently tied to this Action.  The function passed
160 in should...</div><div class="long"><p>Executes the specified function once for each Component currently tied to this Action.  The function passed
161 in should accept a single argument that will be an object that supports the basic Action config/method interface.</p>
162 <h3 class="pa">Parameters</h3><ul><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>The function to execute for each component</p>
163 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>The scope (<code>this</code> reference) in which the function is executed.  Defaults to the Component.</p>
164 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
165 </li></ul></div></div></div><div id="method-enable" class="member ni"><a href="Ext.Action.html#method-enable" rel="method-enable" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-method-enable" class="viewSource">view source</a></div><a name="enable"></a><a name="method-enable"></a><a href="Ext.Action.html#" rel="method-enable" class="cls expand">enable</a> : void</div><div class="description"><div class="short"><p>Enables all components configured by this Action.</p>
166 </div><div class="long"><p>Enables all components configured by this Action.</p>
167 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
168 </li></ul></div></div></div><div id="method-execute" class="member ni"><a href="Ext.Action.html#method-execute" rel="method-execute" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-method-execute" class="viewSource">view source</a></div><a name="execute"></a><a name="method-execute"></a><a href="Ext.Action.html#" rel="method-execute" class="cls expand">execute</a>(
169 <span class="pre">[Mixed arg1], [Mixed arg2], [Mixed etc]</span>)
170  : void</div><div class="description"><div class="short">Executes this Action manually using the handler function specified in the original config object
171 or the handler funct...</div><div class="long"><p>Executes this Action manually using the handler function specified in the original config object
172 or the handler function set with <code><a href="Ext.Action.html#setHandler" rel="Ext.Action#setHandler" class="docClass">setHandler</a></code>.  Any arguments passed to this
173 function will be passed on to the handler function.</p>
174 <h3 class="pa">Parameters</h3><ul><li><span class="pre">arg1</span> : Mixed<div class="sub-desc"><p>(optional) Variable number of arguments passed to the handler function</p>
175 </div></li><li><span class="pre">arg2</span> : Mixed<div class="sub-desc"><p>(optional)</p>
176 </div></li><li><span class="pre">etc</span> : Mixed<div class="sub-desc"><p>... (optional)</p>
177 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
178 </li></ul></div></div></div><div id="method-getIconCls" class="member ni"><a href="Ext.Action.html#method-getIconCls" rel="method-getIconCls" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-method-getIconCls" class="viewSource">view source</a></div><a name="getIconCls"></a><a name="method-getIconCls"></a><a href="Ext.Action.html#" rel="method-getIconCls" class="cls expand">getIconCls</a> : void</div><div class="description"><div class="short"><p>Gets the icon CSS class currently used by all components configured by this Action.</p>
179 </div><div class="long"><p>Gets the icon CSS class currently used by all components configured by this Action.</p>
180 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
181 </li></ul></div></div></div><div id="method-getText" class="member ni"><a href="Ext.Action.html#method-getText" rel="method-getText" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-method-getText" class="viewSource">view source</a></div><a name="getText"></a><a name="method-getText"></a><a href="Ext.Action.html#" rel="method-getText" class="cls expand">getText</a> : void</div><div class="description"><div class="short"><p>Gets the text currently displayed by all components configured by this Action.</p>
182 </div><div class="long"><p>Gets the text currently displayed by all components configured by this Action.</p>
183 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
184 </li></ul></div></div></div><div id="method-hide" class="member ni"><a href="Ext.Action.html#method-hide" rel="method-hide" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-method-hide" class="viewSource">view source</a></div><a name="hide"></a><a name="method-hide"></a><a href="Ext.Action.html#" rel="method-hide" class="cls expand">hide</a> : void</div><div class="description"><div class="short"><p>Hides all components configured by this Action.</p>
185 </div><div class="long"><p>Hides all components configured by this Action.</p>
186 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
187 </li></ul></div></div></div><div id="method-isDisabled" class="member ni"><a href="Ext.Action.html#method-isDisabled" rel="method-isDisabled" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-method-isDisabled" class="viewSource">view source</a></div><a name="isDisabled"></a><a name="method-isDisabled"></a><a href="Ext.Action.html#" rel="method-isDisabled" class="cls expand">isDisabled</a> : void</div><div class="description"><div class="short"><p>Returns true if the components using this Action are currently disabled, else returns false.</p>
188 </div><div class="long"><p>Returns true if the components using this Action are currently disabled, else returns false.</p>
189 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
190 </li></ul></div></div></div><div id="method-isHidden" class="member ni"><a href="Ext.Action.html#method-isHidden" rel="method-isHidden" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-method-isHidden" class="viewSource">view source</a></div><a name="isHidden"></a><a name="method-isHidden"></a><a href="Ext.Action.html#" rel="method-isHidden" class="cls expand">isHidden</a> : void</div><div class="description"><div class="short"><p>Returns true if the components configured by this Action are currently hidden, else returns false.</p>
191 </div><div class="long"><p>Returns true if the components configured by this Action are currently hidden, else returns false.</p>
192 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
193 </li></ul></div></div></div><div id="method-setDisabled" class="member ni"><a href="Ext.Action.html#method-setDisabled" rel="method-setDisabled" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-method-setDisabled" class="viewSource">view source</a></div><a name="setDisabled"></a><a name="method-setDisabled"></a><a href="Ext.Action.html#" rel="method-setDisabled" class="cls expand">setDisabled</a>(
194 <span class="pre">Boolean disabled</span>)
195  : void</div><div class="description"><div class="short"><p>Sets the disabled state of all components configured by this Action.  Shortcut method
196 for <a href="Ext.Action.html#enable" rel="Ext.Action#enable" class="docClass">enable</a> and <a href="Ext.Action.html#disable" rel="Ext.Action#disable" class="docClass">disable</a>.</p>
197 </div><div class="long"><p>Sets the disabled state of all components configured by this Action.  Shortcut method
198 for <a href="Ext.Action.html#enable" rel="Ext.Action#enable" class="docClass">enable</a> and <a href="Ext.Action.html#disable" rel="Ext.Action#disable" class="docClass">disable</a>.</p>
199 <h3 class="pa">Parameters</h3><ul><li><span class="pre">disabled</span> : Boolean<div class="sub-desc"><p>True to disable the component, false to enable it</p>
200 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
201 </li></ul></div></div></div><div id="method-setHandler" class="member ni"><a href="Ext.Action.html#method-setHandler" rel="method-setHandler" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-method-setHandler" class="viewSource">view source</a></div><a name="setHandler"></a><a name="method-setHandler"></a><a href="Ext.Action.html#" rel="method-setHandler" class="cls expand">setHandler</a>(
202 <span class="pre">Function fn, Object scope</span>)
203  : void</div><div class="description"><div class="short"><p>Sets the function that will be called by each Component using this action when its primary event is triggered.</p>
204 </div><div class="long"><p>Sets the function that will be called by each Component using this action when its primary event is triggered.</p>
205 <h3 class="pa">Parameters</h3><ul><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>The function that will be invoked by the action's components.  The function
206 will be called with no arguments.</p>
207 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>The scope (<code>this</code> reference) in which the function is executed. Defaults to the Component firing the event.</p>
208 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
209 </li></ul></div></div></div><div id="method-setHidden" class="member ni"><a href="Ext.Action.html#method-setHidden" rel="method-setHidden" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-method-setHidden" class="viewSource">view source</a></div><a name="setHidden"></a><a name="method-setHidden"></a><a href="Ext.Action.html#" rel="method-setHidden" class="cls expand">setHidden</a>(
210 <span class="pre">Boolean hidden</span>)
211  : void</div><div class="description"><div class="short"><p>Sets the hidden state of all components configured by this Action.  Shortcut method
212 for <code><a href="Ext.Action.html#hide" rel="Ext.Action#hide" class="docClass">hide</a></code> and <code><a href="Ext.Action.html#show" rel="Ext.Action#show" class="docClass">show</a></code>.</p>
213 </div><div class="long"><p>Sets the hidden state of all components configured by this Action.  Shortcut method
214 for <code><a href="Ext.Action.html#hide" rel="Ext.Action#hide" class="docClass">hide</a></code> and <code><a href="Ext.Action.html#show" rel="Ext.Action#show" class="docClass">show</a></code>.</p>
215 <h3 class="pa">Parameters</h3><ul><li><span class="pre">hidden</span> : Boolean<div class="sub-desc"><p>True to hide the component, false to show it</p>
216 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
217 </li></ul></div></div></div><div id="method-setIconCls" class="member ni"><a href="Ext.Action.html#method-setIconCls" rel="method-setIconCls" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-method-setIconCls" class="viewSource">view source</a></div><a name="setIconCls"></a><a name="method-setIconCls"></a><a href="Ext.Action.html#" rel="method-setIconCls" class="cls expand">setIconCls</a>(
218 <span class="pre">String cls</span>)
219  : void</div><div class="description"><div class="short">Sets the icon CSS class for all components configured by this Action.  The class should supply
220 a background image tha...</div><div class="long"><p>Sets the icon CSS class for all components configured by this Action.  The class should supply
221 a background image that will be used as the icon image.</p>
222 <h3 class="pa">Parameters</h3><ul><li><span class="pre">cls</span> : String<div class="sub-desc"><p>The CSS class supplying the icon image</p>
223 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
224 </li></ul></div></div></div><div id="method-setText" class="member ni"><a href="Ext.Action.html#method-setText" rel="method-setText" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-method-setText" class="viewSource">view source</a></div><a name="setText"></a><a name="method-setText"></a><a href="Ext.Action.html#" rel="method-setText" class="cls expand">setText</a>(
225 <span class="pre">String text</span>)
226  : void</div><div class="description"><div class="short"><p>Sets the text to be displayed by all components configured by this Action.</p>
227 </div><div class="long"><p>Sets the text to be displayed by all components configured by this Action.</p>
228 <h3 class="pa">Parameters</h3><ul><li><span class="pre">text</span> : String<div class="sub-desc"><p>The text to display</p>
229 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
230 </li></ul></div></div></div><div id="method-show" class="member ni"><a href="Ext.Action.html#method-show" rel="method-show" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Action.html" class="definedIn docClass">Ext.Action</a><br/><a href="../source/Action.html#Ext-Action-method-show" class="viewSource">view source</a></div><a name="show"></a><a name="method-show"></a><a href="Ext.Action.html#" rel="method-show" class="cls expand">show</a> : void</div><div class="description"><div class="short"><p>Shows all components configured by this Action.</p>
231 </div><div class="long"><p>Shows all components configured by this Action.</p>
232 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
233 </li></ul></div></div></div></div></div></div></div><div id="pageContent"></div></div></div></div></body></html>