Note that there are some explanatory texts on larger screens.

plurals
  1. POExtJS Error "TypeError: Ext.state is undefined"
    text
    copied!<p>I am new to ExtJS. I saw an example and copied that on an empty page. When I run this page I get an error:<br/><br/> <strong>TypeError: Ext.state is undefined Ext.state.Manager.setProvider(Ext.create('Ext.state.CookieProvider'));</strong><br/><br/>Here is the complete code of what I am trying:<br/><br/> &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" rel="nofollow">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>"></p> <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;title&gt;ExtJS CRUD&lt;/title&gt; &lt;link href="extjs/resources/ext-theme-neptune/ext-theme-neptune-all.css" rel="stylesheet" type="text/css" /&gt; &lt;script type="text/javascript" src="extjs/ext-debug.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;script language="javascript" type="text/javascript"&gt; Ext.state.Manager.setProvider(Ext.create('Ext.state.CookieProvider')); Ext.create('Ext.form.ComboBox', { fieldLabel: 'Choose', store: [[1, "Harpo"], [2, "Chico"], [3, "Groucho"]], displayField: 'name', typeAhead: true, forceSelection: true, valueField: 'abbr', renderTo: Ext.getBody(), stateful: true, stateId: 'myIdentifierUniqueAmongAllMyStatefulComponentsUsedToStoreAndFetchMyState', stateEvents: ['select'], getState: function (me) { // On any of the stateEvents, the framework runs this. // "Hey component, what do you want me to remember for you? return { value: this.getValue() }; }, applyState: function (state) { // On component initialization, the framework runs this. // "Hey component, here's that object I saved for you this.setValue(state.value); } }); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>What am I missing?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload