Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I tried it with following code and it works without a problem!</p> <p>store:</p> <pre><code>Ext.define('bluebutton.store.BlueButton.Testing', { extend : "Ext.data.Store", requires : [ 'bluebutton.model.BlueButton.Testing' ], config : { storeId : 'testingstore', model : 'bluebutton.model.BlueButton.Testing' } }); </code></pre> <p>model:</p> <pre><code>Ext.define('bluebutton.model.BlueButton.Testing', { extend : 'Ext.data.Model', requires : ['Ext.data.proxy.LocalStorage'], config : { fields : [{ name : 'first', type : 'string' }, { name : 'second', type : 'string' }], proxy : { type : 'localstorage', id : '_codeAnalyzerLocalStorage' } } }); </code></pre> <p>view:</p> <pre><code>Ext.define('bluebutton.view.BlueButton.Testing', { extend : 'Ext.form.Panel', xtype : 'testing', config : { fullscreen : true, id : 'register', items : [{ xtype : 'textfield', name : 'name', label : 'Name' }, { xtype : 'emailfield', name : 'email', label : 'Email' }, { xtype : 'button', text : 'Test Local', handler : function(button) { var test = Ext.getStore('testingstore'); console.log(test); } }] } }); </code></pre> <p>app.js:</p> <pre><code>Ext.Loader.setConfig({ enabled : true, }); Ext.application({ name : 'bluebutton', views : [ 'BlueButton.Testing', ], stores : [ 'BlueButton.Testing', ], models : [ 'BlueButton.Testing', ], launch : function() { Ext.create('bluebutton.view.BlueButton.Testing'); } }); </code></pre> <p>The console logs me the store after pushing the button.</p> <p>But I think it would be a nicer code, when you put the button action in the controller, not the view!</p> <pre><code>button config: { xtype : 'button', text : 'Test Local', action : 'buttonTest' } </code></pre> <p>controller:</p> <pre><code>Ext.define('bluebutton.controller.BlueButton.Testing', { extend : 'Ext.app.Controller', config : { control : { 'button[action="buttonTest"]' : { tap : 'testButtonTap' } } }, testButtonTap : function() { var test = Ext.getStore('testingstore'); console.log(test); } }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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