webgui/www/extras/extjs/docs/output/Ext.state.Provider.html

212 lines
No EOL
10 KiB
HTML

<!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Ext.state.Provider</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">&nbsp;<a href="Ext.state.Provider.html" target="_blank">Print Friendly</a><br/>
</div>
<h1>Class Ext.state.Provider</h1>
<table cellspacing="0">
<tr><td class="label">Package:</td><td>Ext.state</td></tr>
<tr><td class="label">Class:</td><td>Provider</td></tr>
<tr><td class="label">Extends:</td><td>Object</td></tr>
<tr><td class="label">Subclasses:</td><td><a href="Ext.state.CookieProvider.html">CookieProvider</a></td></tr>
<tr><td class="label">Defined In:</td><td><a href="State.jss.html">State.js</a></td></tr>
</table>
<div class="description">
Abstract base class for state provider implementations. This class provides methods
for encoding and decoding <b>typed</b> variables including dates and defines the
Provider interface. </div>
<br />
<a href="#properties">Properties</a>
&nbsp;&nbsp;-&nbsp;&nbsp;<a href="#methods">Methods</a>
&nbsp;&nbsp;-&nbsp;&nbsp;<a href="#events">Events</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">&nbsp;</td>
<td class="sig"><a class="mlink" href="#clear">clear</a>(<code>String name</code>) : void</td>
<td class="msource" rowspan="2">Provider</td>
</tr>
<tr>
<td class="mdesc">Clears a value from the state</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#decodeValue">decodeValue</a>(<code>String value</code>) : Mixed</td>
<td class="msource" rowspan="2">Provider</td>
</tr>
<tr class="alt">
<td class="mdesc">Decodes a string previously encoded with <a href="#encodeValue">encodeValue</a>.</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#encodeValue">encodeValue</a>(<code>Mixed value</code>) : String</td>
<td class="msource" rowspan="2">Provider</td>
</tr>
<tr>
<td class="mdesc">Encodes a value including type information. Decode with <a href="#decodeValue">decodeValue</a>.</td>
</tr>
<tr class="alt">
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#get">get</a>(<code>String name</code>, <code>Mixed defaultValue</code>) : Mixed</td>
<td class="msource" rowspan="2">Provider</td>
</tr>
<tr class="alt">
<td class="mdesc">Returns the current value for a key</td>
</tr>
<tr>
<td class="micon" rowspan="2">&nbsp;</td>
<td class="sig"><a class="mlink" href="#set">set</a>(<code>String name</code>, <code>Mixed value</code>) : void</td>
<td class="msource" rowspan="2">Provider</td>
</tr>
<tr>
<td class="mdesc">Sets the value for a key</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">&nbsp;</td>
<td class="sig"><a class="mlink" href="#event-statechange">statechange</a> : (<code>Provider this</code>, <code>String key</code>, <code>String value</code>)</td>
<td class="msource" rowspan="2">Provider</td>
</tr>
<tr>
<td class="mdesc">Fires when a state change occurs.</td>
</tr>
</table>
<h2 class="mdetail-head">Method Details</h2>
<div class="detail-wrap">
<a name="clear"></a>
<div class="mdetail">
<h3>clear</i></h3>
<code>public function clear(<code>String name</code>)</code>
<div class="mdetail-desc">
Clears a value from the state
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>name</code> : String<div class="sub-desc">The key name</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by Provider.</div>
</div>
<a name="decodeValue"></a>
<div class="mdetail alt">
<h3>decodeValue</i></h3>
<code>public function decodeValue(<code>String value</code>)</code>
<div class="mdetail-desc">
Decodes a string previously encoded with <a href="#encodeValue">encodeValue</a>.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>value</code> : String<div class="sub-desc">The value to decode</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Mixed</code><div class="sub-desc">The decoded value</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by Provider.</div>
</div>
<a name="encodeValue"></a>
<div class="mdetail">
<h3>encodeValue</i></h3>
<code>public function encodeValue(<code>Mixed value</code>)</code>
<div class="mdetail-desc">
Encodes a value including type information. Decode with <a href="#decodeValue">decodeValue</a>.
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>value</code> : Mixed<div class="sub-desc">The value to encode</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>String</code><div class="sub-desc">The encoded value</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by Provider.</div>
</div>
<a name="get"></a>
<div class="mdetail alt">
<h3>get</i></h3>
<code>public function get(<code>String name</code>, <code>Mixed defaultValue</code>)</code>
<div class="mdetail-desc">
Returns the current value for a key
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>name</code> : String<div class="sub-desc">The key name</div></li><li><code>defaultValue</code> : Mixed<div class="sub-desc">A default value to return if the key's value is not found</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Mixed</code><div class="sub-desc">The state data</div></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by Provider.</div>
</div>
<a name="set"></a>
<div class="mdetail">
<h3>set</i></h3>
<code>public function set(<code>String name</code>, <code>Mixed value</code>)</code>
<div class="mdetail-desc">
Sets the value for a key
<div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>name</code> : String<div class="sub-desc">The key name</div></li><li><code>value</code> : Mixed<div class="sub-desc">The value to set</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
<div class="mdetail-def">This method is defined by Provider.</div>
</div>
</div>
<h2 class="mdetail-head">Event Details</h2>
<div class="detail-wrap">
<a name="event-statechange"></a>
<div class="mdetail">
<h3>statechange</i></h3>
<code>public event statechange</code>
<div class="mdetail-desc">
Fires when a state change occurs.
<div class="mdetail-params">
<strong style="font-weight:normal;">Subscribers will be called with the following parameters:</strong>
<ul><li><code>this</code> : Provider<div class="sub-desc">This state provider</div></li><li><code>key</code> : String<div class="sub-desc">The state key which was changed</div></li><li><code>value</code> : String<div class="sub-desc">The encoded value for the state</div></li> </ul>
</div>
</div>
<div class="mdetail-def">This event is defined by Provider.</div>
</div>
</div>
</div>
<hr>
<div style="font-size:10px;text-align:center;color:gray;">Ext - Copyright &copy; 2006-2007 Ext JS, LLC<br />All rights reserved.</div>
</body>
</html>