874 lines
No EOL
51 KiB
HTML
874 lines
No EOL
51 KiB
HTML
<!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html>
|
|
<head>
|
|
<title>Ext.ContentPanel</title>
|
|
<link rel="stylesheet" type="text/css" href="../resources/reset.css"/>
|
|
<link rel="stylesheet" type="text/css" href="../resources/style.css" media="screen"/>
|
|
<link rel="stylesheet" type="text/css" href="../resources/print.css" media="print">
|
|
<!-- GC -->
|
|
</head>
|
|
<body>
|
|
<div class="body-wrap">
|
|
<div class="top-tools">
|
|
<img src="../resources/print.gif" width="16" height="16" align="absmiddle"> <a href="Ext.ContentPanel.html" target="_blank">Print Friendly</a><br/>
|
|
|
|
</div>
|
|
<h1>Class Ext.ContentPanel</h1>
|
|
<table cellspacing="0">
|
|
<tr><td class="label">Package:</td><td>Ext</td></tr>
|
|
<tr><td class="label">Class:</td><td>ContentPanel</td></tr>
|
|
<tr><td class="label">Extends:</td><td><a href="Ext.util.Observable.html">Observable</a></td></tr>
|
|
<tr><td class="label">Subclasses:</td><td><a href="Ext.GridPanel.html">GridPanel</a>, <a href="Ext.NestedLayoutPanel.html">NestedLayoutPanel</a></td></tr>
|
|
<tr><td class="label">Defined In:</td><td><a href="ContentPanels.jss.html">ContentPanels.js</a></td></tr>
|
|
</table>
|
|
<div class="description">
|
|
A basic ContentPanel element. </div>
|
|
<br />
|
|
<a href="#properties">Properties</a>
|
|
- <a href="#methods">Methods</a>
|
|
- <a href="#events">Events</a>
|
|
- <a href="#configs">Config Options</a>
|
|
<hr />
|
|
<a name="properties"></a>
|
|
<h2>Public Properties</h2>
|
|
<div class="no-members">This class has no public properties.</div> <a name="methods"></a>
|
|
<h2>Public Methods</h2>
|
|
<table cellspacing="0" class="member-table">
|
|
<tr>
|
|
<th class="sig-header" colspan="2">Method</th>
|
|
<th class="msource-header">Defined By</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#ContentPanel">ContentPanel</a>(<code>String/HTMLElement/Element el</code>, <code>String/Object config</code>, <span class="optional" title="Optional">[<code>String content</code>]</span>)</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Create a new ContentPanel.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#addEvents">addEvents</a>(<code>Object object</code>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.util.Observable.html#addEvents">Observable</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Copies any events from the passed object onto this object if they do not already exist. The passed object
|
|
must also ...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#addListener">addListener</a>(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.util.Observable.html#addListener">Observable</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Appends an event handler to this component</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#destroy">destroy</a>() : void</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Destroys this panel</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#fireEvent">fireEvent</a>(<code>String eventName</code>, <code>Object... args</code>) : Boolean</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.util.Observable.html#fireEvent">Observable</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Fires the specified event with the passed parameters (minus the event name).</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getEl">getEl</a>() : Ext.Element</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Returns this panel's element</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getId">getId</a>() : String</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Returns this panel's id</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getTitle">getTitle</a>() : String</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Returns this panel's title</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getToolbar">getToolbar</a>() : Ext.Toolbar</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Returns the toolbar for this Panel if one was configured.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getUpdateManager">getUpdateManager</a>() : Ext.UpdateManager</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Get the <a href="Ext.UpdateManager.html">Ext.UpdateManager</a> for this panel. Enables you to perform Ajax updates.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#hasListener">hasListener</a>(<code>String eventName</code>) : Boolean</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.util.Observable.html#hasListener">Observable</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Checks to see if this object is currently listening for a specified event</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#isClosable">isClosable</a>() : Boolean</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Returns true is this panel was configured to be closable</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#load">load</a>(<code>Object/String/Function url</code>, <span class="optional" title="Optional">[<code>String/Object params</code>]</span>, <span class="optional" title="Optional">[<code>Function callback</code>]</span>, <span class="optional" title="Optional">[<code>Boolean discardUrl</code>]</span>) : Ext.ContentPanel</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Loads this content panel immediately with content from XHR. Note: to delay loading until the panel is activated, use ...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#on">on</a>(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object options</code>]</span>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.util.Observable.html#on">Observable</a></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Appends an event handler to this element (shorthand for addListener)</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#purgeListeners">purgeListeners</a>() : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.util.Observable.html#purgeListeners">Observable</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Removes all listeners for this object</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#refresh">refresh</a>() : void</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Force a content refresh from the URL specified in the setUrl() method.
|
|
Will fail silently if the setUrl method has no...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#removeListener">removeListener</a>(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.util.Observable.html#removeListener">Observable</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Removes a listener</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setContent">setContent</a>(<code>String content</code>, <span class="optional" title="Optional">[<code>Boolean loadScripts</code>]</span>) : void</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Updates this panel's element</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setTitle">setTitle</a>(<code>String title</code>) : void</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Set this panel's title</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setUrl">setUrl</a>(<code>String/Function url</code>, <span class="optional" title="Optional">[<code>String/Object params</code>]</span>, <span class="optional" title="Optional">[<code>Boolean loadOnce</code>]</span>) : Ext.UpdateManager</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Set a URL to be used to load the content for this panel. When this panel is activated, the content will be loaded fro...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon inherited" title="Inherited" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#un">un</a>(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>) : void</td>
|
|
<td class="msource" rowspan="2"><a href="Ext.util.Observable.html#un">Observable</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Removes a listener (shorthand for removeListener)</td>
|
|
</tr>
|
|
</table>
|
|
<a name="events"></a>
|
|
<h2>Public Events</h2>
|
|
<table cellspacing="0" class="member-table">
|
|
<tr>
|
|
<th class="sig-header" colspan="2">Event</th>
|
|
<th class="msource-header">Defined By</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#event-activate">activate</a> : (<code>Ext.ContentPanel this</code>)</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Fires when this panel is activated.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#event-deactivate">deactivate</a> : (<code>Ext.ContentPanel this</code>)</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Fires when this panel is activated.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#event-resize">resize</a> : (<code>Ext.ContentPanel this</code>, <code>Number width</code>, <code>Number height</code>)</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Fires when this panel is resized if fitToFrame is true.</td>
|
|
</tr>
|
|
</table>
|
|
<a name="configs"></a>
|
|
<h2>Config Options</h2>
|
|
<table cellspacing="0" class="member-table">
|
|
<tr>
|
|
<th class="sig-header" colspan="2">Config Options</th>
|
|
<th class="msource-header">Defined By</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#config-adjustments">adjustments</a> : Array</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Values to <b>add</b> to the width/height when doing a fitToFrame (default is [0, 0])</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#config-autoCreate">autoCreate</a> : Boolean/Object</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">True to auto generate the DOM element for this panel, or a DomHelper config of the element to create</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#config-autoScroll">autoScroll</a> : Boolean</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">True to scroll overflow in this panel (use with fitToFrame)</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#config-background">background</a> : Boolean</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">True if the panel should not be activated when it is added (defaults to false)</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#config-closable">closable</a> : Boolean</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">True if the panel can be closed/removed</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#config-fitContainer">fitContainer</a> : Boolean</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">When using fitToFrame and resizeEl, you can also fit the parent container (defaults to false)</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#config-fitToFrame">fitToFrame</a> : Boolean</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">True for this panel to adjust its size to fit when the region resizes (defaults to false)</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#config-loadOnce">loadOnce</a> : Boolean</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Calls When used with "url", calls setUrl() with this value</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#config-params">params</a> : String/Object</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">When used with "url", calls setUrl() with this value</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#config-resizeEl">resizeEl</a> : String/HTMLElement/Element</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">An element to resize if fitToFrame is true (instead of this panel's element)</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#config-title">title</a> : String</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">The title for this panel</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#config-toolbar">toolbar</a> : Toolbar</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">A toolbar for this panel</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#config-url">url</a> : String</td>
|
|
<td class="msource" rowspan="2">ContentPanel</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Calls setUrl() with this value</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<a name="ContentPanel"></a>
|
|
<h2 class="mdetail-head">Constructor Details</h2>
|
|
<div class="detail-wrap">
|
|
<div class="mdetail">
|
|
<h3>ContentPanel</i></h3>
|
|
<code>public function ContentPanel(<code>String/HTMLElement/Element el</code>, <code>String/Object config</code>, <span class="optional" title="Optional">[<code>String content</code>]</span>)</code>
|
|
<div class="mdetail-desc">
|
|
Create a new ContentPanel. <div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>el</code> : String/HTMLElement/Element<div class="sub-desc">The container element for this panel</div></li><li><code>config</code> : String/Object<div class="sub-desc">A string to set only the title or a config object</div></li><li><code>content</code> : String<div class="sub-desc">(optional) Set the HTML content for this panel</div></li> </ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2 class="mdetail-head">Method Details</h2>
|
|
<div class="detail-wrap">
|
|
<a name="addEvents"></a>
|
|
<div class="mdetail">
|
|
<h3>addEvents</i></h3>
|
|
<code>public function addEvents(<code>Object object</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Copies any events from the passed object onto this object if they do not already exist. The passed object
|
|
must also inherit from Observable for this method to have any effect.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>object</code> : Object<div class="sub-desc">The object from which to copy events</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.util.Observable.html#addEvents">Observable</a>.</div>
|
|
</div>
|
|
<a name="addListener"></a>
|
|
<div class="mdetail alt">
|
|
<h3>addListener</i></h3>
|
|
<code>public function addListener(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span>)</code>
|
|
<div class="mdetail-desc">
|
|
Appends an event handler to this component
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the handler function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configuration properties. This may contain any of the following properties:<ul> <li>scope {Object} The scope in which to execute the handler function. The handler function's "this" context.</li> <li>delegate {String} A simple selector to filter the target or look for a descendant of the target</li> <li>stopEvent {Boolean} True to stop the event. That is stop propagation, and prevent the default action.</li> <li>preventDefault {Boolean} True to prevent the default action</li> <li>stopPropagation {Boolean} True to prevent event propagation</li> <li>normalized {Boolean} False to pass a browser event to the handler function instead of an Ext.EventObject</li> <li>delay {Number} The number of milliseconds to delay the invocation of the handler after te event fires.</li> <li>single {Boolean} True to add a handler to handle just the next firing of the event, and then remove itself.</li> <li>buffer {Number} Causes the handler to be scheduled to run in an <a href="Ext.util.DelayedTask.html">Ext.util.DelayedTask</a> delayed by the specified number of milliseconds. If the event fires again within that time, the original handler is <em>not</em> invoked, but the new handler is scheduled in its place.</li> </ul> <p> <b>Combining Options</b><br> Using the options argument, it is possible to combine different types of listeners:<br> <br> A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)<div style="margin: 5px 20px 20px;"> Code: <pre><code>el.on('click', this.onClick, this, { single: true, delay: 100, stopEvent : true, forumId: 4 });</pre> <p> The method also allows for a single argument to be passed which is a config object containing properties which specify multiple handlers. <p> <b>Attaching multiple handlers in 1 call</b><br> Code: <pre><code>el.on({ 'click' : { fn: this.onClick scope: this, delay: 100 }, 'mouseover' : { fn: this.onMouseOver scope: this }, 'mouseout' : { fn: this.onMouseOut scope: this } });</pre> <p> Or a shorthand syntax:<br> Code: <pre><code>el.on({ 'click' : this.onClick, 'mouseover' : this.onMouseOver, 'mouseout' : this.onMouseOut scope: this });</pre></div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.util.Observable.html#addListener">Observable</a>.</div>
|
|
</div>
|
|
<a name="destroy"></a>
|
|
<div class="mdetail">
|
|
<h3>destroy</i></h3>
|
|
<code>public function destroy()</code>
|
|
<div class="mdetail-desc">
|
|
Destroys this panel
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="fireEvent"></a>
|
|
<div class="mdetail alt">
|
|
<h3>fireEvent</i></h3>
|
|
<code>public function fireEvent(<code>String eventName</code>, <code>Object... args</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Fires the specified event with the passed parameters (minus the event name).
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>eventName</code> : String<div class="sub-desc"></div></li><li><code>args</code> : Object...<div class="sub-desc">Variable number of parameters are passed to handlers</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Boolean</code><div class="sub-desc">returns false if any of the handlers return false otherwise it returns true</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.util.Observable.html#fireEvent">Observable</a>.</div>
|
|
</div>
|
|
<a name="getEl"></a>
|
|
<div class="mdetail">
|
|
<h3>getEl</i></h3>
|
|
<code>public function getEl()</code>
|
|
<div class="mdetail-desc">
|
|
Returns this panel's element
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Ext.Element</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="getId"></a>
|
|
<div class="mdetail alt">
|
|
<h3>getId</i></h3>
|
|
<code>public function getId()</code>
|
|
<div class="mdetail-desc">
|
|
Returns this panel's id
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>String</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="getTitle"></a>
|
|
<div class="mdetail">
|
|
<h3>getTitle</i></h3>
|
|
<code>public function getTitle()</code>
|
|
<div class="mdetail-desc">
|
|
Returns this panel's title
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>String</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="getToolbar"></a>
|
|
<div class="mdetail alt">
|
|
<h3>getToolbar</i></h3>
|
|
<code>public function getToolbar()</code>
|
|
<div class="mdetail-desc">
|
|
Returns the toolbar for this Panel if one was configured.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Ext.Toolbar</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="getUpdateManager"></a>
|
|
<div class="mdetail">
|
|
<h3>getUpdateManager</i></h3>
|
|
<code>public function getUpdateManager()</code>
|
|
<div class="mdetail-desc">
|
|
Get the <a href="Ext.UpdateManager.html">Ext.UpdateManager</a> for this panel. Enables you to perform Ajax updates.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Ext.UpdateManager</code><div class="sub-desc">The UpdateManager</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="hasListener"></a>
|
|
<div class="mdetail alt">
|
|
<h3>hasListener</i></h3>
|
|
<code>public function hasListener(<code>String eventName</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Checks to see if this object is currently listening for a specified event
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to check for</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Boolean</code><div class="sub-desc">True if the event is being listened for, else false</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.util.Observable.html#hasListener">Observable</a>.</div>
|
|
</div>
|
|
<a name="isClosable"></a>
|
|
<div class="mdetail">
|
|
<h3>isClosable</i></h3>
|
|
<code>public function isClosable()</code>
|
|
<div class="mdetail-desc">
|
|
Returns true is this panel was configured to be closable
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Boolean</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="load"></a>
|
|
<div class="mdetail alt">
|
|
<h3>load</i></h3>
|
|
<code>public function load(<code>Object/String/Function url</code>, <span class="optional" title="Optional">[<code>String/Object params</code>]</span>, <span class="optional" title="Optional">[<code>Function callback</code>]</span>, <span class="optional" title="Optional">[<code>Boolean discardUrl</code>]</span>)</code>
|
|
<div class="mdetail-desc">
|
|
Loads this content panel immediately with content from XHR. Note: to delay loading until the panel is activated, use setUrl.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>url</code> : Object/String/Function<div class="sub-desc">The url for this request or a function to call to get the url or a config object containing any of the following options: <pre><code> panel.load({<br/> url: "your-url.php",<br/> params: {param1: "foo", param2: "bar"}, // or a URL encoded string<br/> callback: yourFunction,<br/> scope: yourObject, //(optional scope) <br/> discardUrl: false, <br/> nocache: false,<br/> text: "Loading...",<br/> timeout: 30,<br/> scripts: false<br/> }); </code></pre> The only required property is url. The optional properties nocache, text and scripts are shorthand for disableCaching, indicatorText and loadScripts and are used to set their associated property on this panel UpdateManager instance.</div></li><li><code>params</code> : String/Object<div class="sub-desc">(optional) The parameters to pass as either a url encoded string "param1=1&param2=2" or an object {param1: 1, param2: 2}</div></li><li><code>callback</code> : Function<div class="sub-desc">(optional) Callback when transaction is complete - called with signature (oElement, bSuccess, oResponse)</div></li><li><code>discardUrl</code> : Boolean<div class="sub-desc">(optional) By default when you execute an update the defaultUrl is changed to the last used url. If true, it will not store the url.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Ext.ContentPanel</code><div class="sub-desc">this</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="on"></a>
|
|
<div class="mdetail">
|
|
<h3>on</i></h3>
|
|
<code>public function on(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object options</code>]</span>)</code>
|
|
<div class="mdetail-desc">
|
|
Appends an event handler to this element (shorthand for addListener)
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>options</code> : Object<div class="sub-desc">(optional)</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.util.Observable.html#on">Observable</a>.</div>
|
|
</div>
|
|
<a name="purgeListeners"></a>
|
|
<div class="mdetail alt">
|
|
<h3>purgeListeners</i></h3>
|
|
<code>public function purgeListeners()</code>
|
|
<div class="mdetail-desc">
|
|
Removes all listeners for this object
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.util.Observable.html#purgeListeners">Observable</a>.</div>
|
|
</div>
|
|
<a name="refresh"></a>
|
|
<div class="mdetail">
|
|
<h3>refresh</i></h3>
|
|
<code>public function refresh()</code>
|
|
<div class="mdetail-desc">
|
|
Force a content refresh from the URL specified in the setUrl() method.
|
|
Will fail silently if the setUrl method has not been called.
|
|
This does not activate the panel, just updates its content.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="removeListener"></a>
|
|
<div class="mdetail alt">
|
|
<h3>removeListener</i></h3>
|
|
<code>public function removeListener(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>)</code>
|
|
<div class="mdetail-desc">
|
|
Removes a listener
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.util.Observable.html#removeListener">Observable</a>.</div>
|
|
</div>
|
|
<a name="setContent"></a>
|
|
<div class="mdetail">
|
|
<h3>setContent</i></h3>
|
|
<code>public function setContent(<code>String content</code>, <span class="optional" title="Optional">[<code>Boolean loadScripts</code>]</span>)</code>
|
|
<div class="mdetail-desc">
|
|
Updates this panel's element
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>content</code> : String<div class="sub-desc">The new content</div></li><li><code>loadScripts</code> : Boolean<div class="sub-desc">(optional) true to look for and process scripts</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="setTitle"></a>
|
|
<div class="mdetail alt">
|
|
<h3>setTitle</i></h3>
|
|
<code>public function setTitle(<code>String title</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Set this panel's title
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>title</code> : String<div class="sub-desc"></div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="setUrl"></a>
|
|
<div class="mdetail">
|
|
<h3>setUrl</i></h3>
|
|
<code>public function setUrl(<code>String/Function url</code>, <span class="optional" title="Optional">[<code>String/Object params</code>]</span>, <span class="optional" title="Optional">[<code>Boolean loadOnce</code>]</span>)</code>
|
|
<div class="mdetail-desc">
|
|
Set a URL to be used to load the content for this panel. When this panel is activated, the content will be loaded from that URL.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>url</code> : String/Function<div class="sub-desc">The url to load the content from or a function to call to get the url</div></li><li><code>params</code> : String/Object<div class="sub-desc">(optional) The string params for the update call or an object of the params. See <a href="Ext.UpdateManager.html#update">Ext.UpdateManager.update</a> for more details. (Defaults to null)</div></li><li><code>loadOnce</code> : Boolean<div class="sub-desc">(optional) Whether to only load the content once. If this is false it makes the Ajax call every time this panel is activated. (Defaults to false)</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Ext.UpdateManager</code><div class="sub-desc">The UpdateManager</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="un"></a>
|
|
<div class="mdetail alt">
|
|
<h3>un</i></h3>
|
|
<code>public function un(<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>)</code>
|
|
<div class="mdetail-desc">
|
|
Removes a listener (shorthand for removeListener)
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by <a href="Ext.util.Observable.html#un">Observable</a>.</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2 class="mdetail-head">Event Details</h2>
|
|
<div class="detail-wrap">
|
|
<a name="event-activate"></a>
|
|
<div class="mdetail">
|
|
<h3>activate</i></h3>
|
|
<code>public event activate</code>
|
|
<div class="mdetail-desc">
|
|
Fires when this panel is activated.
|
|
<div class="mdetail-params">
|
|
<strong style="font-weight:normal;">Subscribers will be called with the following parameters:</strong>
|
|
<ul><li><code>this</code> : Ext.ContentPanel<div class="sub-desc"></div></li> </ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This event is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="event-deactivate"></a>
|
|
<div class="mdetail alt">
|
|
<h3>deactivate</i></h3>
|
|
<code>public event deactivate</code>
|
|
<div class="mdetail-desc">
|
|
Fires when this panel is activated.
|
|
<div class="mdetail-params">
|
|
<strong style="font-weight:normal;">Subscribers will be called with the following parameters:</strong>
|
|
<ul><li><code>this</code> : Ext.ContentPanel<div class="sub-desc"></div></li> </ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This event is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="event-resize"></a>
|
|
<div class="mdetail">
|
|
<h3>resize</i></h3>
|
|
<code>public event resize</code>
|
|
<div class="mdetail-desc">
|
|
Fires when this panel is resized if fitToFrame is true.
|
|
<div class="mdetail-params">
|
|
<strong style="font-weight:normal;">Subscribers will be called with the following parameters:</strong>
|
|
<ul><li><code>this</code> : Ext.ContentPanel<div class="sub-desc"></div></li><li><code>width</code> : Number<div class="sub-desc">The width after any component adjustments</div></li><li><code>height</code> : Number<div class="sub-desc">The height after any component adjustments</div></li> </ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This event is defined by ContentPanel.</div>
|
|
</div>
|
|
</div>
|
|
<h2 class="mdetail-head">Config Details</h2>
|
|
<div class="detail-wrap">
|
|
<a name="config-adjustments"></a>
|
|
<div class="mdetail">
|
|
<h3>adjustments</i></h3>
|
|
<code>adjustments : Array</code>
|
|
<div class="mdetail-desc">
|
|
Values to <b>add</b> to the width/height when doing a fitToFrame (default is [0, 0]) </div>
|
|
<div class="mdetail-def">This config option is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="config-autoCreate"></a>
|
|
<div class="mdetail alt">
|
|
<h3>autoCreate</i></h3>
|
|
<code>autoCreate : Boolean/Object</code>
|
|
<div class="mdetail-desc">
|
|
True to auto generate the DOM element for this panel, or a DomHelper config of the element to create </div>
|
|
<div class="mdetail-def">This config option is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="config-autoScroll"></a>
|
|
<div class="mdetail">
|
|
<h3>autoScroll</i></h3>
|
|
<code>autoScroll : Boolean</code>
|
|
<div class="mdetail-desc">
|
|
True to scroll overflow in this panel (use with fitToFrame) </div>
|
|
<div class="mdetail-def">This config option is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="config-background"></a>
|
|
<div class="mdetail alt">
|
|
<h3>background</i></h3>
|
|
<code>background : Boolean</code>
|
|
<div class="mdetail-desc">
|
|
True if the panel should not be activated when it is added (defaults to false) </div>
|
|
<div class="mdetail-def">This config option is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="config-closable"></a>
|
|
<div class="mdetail">
|
|
<h3>closable</i></h3>
|
|
<code>closable : Boolean</code>
|
|
<div class="mdetail-desc">
|
|
True if the panel can be closed/removed </div>
|
|
<div class="mdetail-def">This config option is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="config-fitContainer"></a>
|
|
<div class="mdetail alt">
|
|
<h3>fitContainer</i></h3>
|
|
<code>fitContainer : Boolean</code>
|
|
<div class="mdetail-desc">
|
|
When using fitToFrame and resizeEl, you can also fit the parent container (defaults to false) </div>
|
|
<div class="mdetail-def">This config option is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="config-fitToFrame"></a>
|
|
<div class="mdetail">
|
|
<h3>fitToFrame</i></h3>
|
|
<code>fitToFrame : Boolean</code>
|
|
<div class="mdetail-desc">
|
|
True for this panel to adjust its size to fit when the region resizes (defaults to false) </div>
|
|
<div class="mdetail-def">This config option is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="config-loadOnce"></a>
|
|
<div class="mdetail alt">
|
|
<h3>loadOnce</i></h3>
|
|
<code>loadOnce : Boolean</code>
|
|
<div class="mdetail-desc">
|
|
Calls When used with "url", calls setUrl() with this value </div>
|
|
<div class="mdetail-def">This config option is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="config-params"></a>
|
|
<div class="mdetail">
|
|
<h3>params</i></h3>
|
|
<code>params : String/Object</code>
|
|
<div class="mdetail-desc">
|
|
When used with "url", calls setUrl() with this value </div>
|
|
<div class="mdetail-def">This config option is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="config-resizeEl"></a>
|
|
<div class="mdetail alt">
|
|
<h3>resizeEl</i></h3>
|
|
<code>resizeEl : String/HTMLElement/Element</code>
|
|
<div class="mdetail-desc">
|
|
An element to resize if fitToFrame is true (instead of this panel's element) </div>
|
|
<div class="mdetail-def">This config option is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="config-title"></a>
|
|
<div class="mdetail">
|
|
<h3>title</i></h3>
|
|
<code>title : String</code>
|
|
<div class="mdetail-desc">
|
|
The title for this panel </div>
|
|
<div class="mdetail-def">This config option is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="config-toolbar"></a>
|
|
<div class="mdetail alt">
|
|
<h3>toolbar</i></h3>
|
|
<code>toolbar : Toolbar</code>
|
|
<div class="mdetail-desc">
|
|
A toolbar for this panel </div>
|
|
<div class="mdetail-def">This config option is defined by ContentPanel.</div>
|
|
</div>
|
|
<a name="config-url"></a>
|
|
<div class="mdetail">
|
|
<h3>url</i></h3>
|
|
<code>url : String</code>
|
|
<div class="mdetail-desc">
|
|
Calls setUrl() with this value </div>
|
|
<div class="mdetail-def">This config option is defined by ContentPanel.</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<hr>
|
|
<div style="font-size:10px;text-align:center;color:gray;">Ext - Copyright © 2006-2007 Ext JS, LLC<br />All rights reserved.</div>
|
|
|
|
</body>
|
|
</html> |