Note that there are some explanatory texts on larger screens.

plurals
  1. POSencha Touch set data
    text
    copied!<p>I want set data from controller into formpanel(textfields). But not working.</p> <p>This is code :</p> <p>Strore</p> <pre><code>Ext.define('MyApp.store.CV_FamilyList', { extend : 'Ext.data.Store', requires : ['MyApp.model.CV_FamilyList'], config : { autoLoad : true, model : 'MyApp.model.CV_FamilyList', storeId : 'CV_FamilyList', proxy : { type : 'ajax', url : '?b=Family', reader : { type : 'json', rootProperty : 'data' } } } }); </code></pre> <p>Model</p> <pre><code>Ext.define('MyApp.model.CV_FamilyList', { extend : 'Ext.data.Model', config : { fields : [ { name : 'id' }, { name : 'member' }, { name : 'firstname' }, { name : 'lastname' }] }, GetPosition : function() { var d = this.data, names = [d.Position]; return names.join(" "); } }); </code></pre> <p>LIST</p> <pre><code>Ext.define('MyApp.view.CV_FamilyEdit', { extend : 'Ext.form.Panel', xtype : 'CV_FamilyEdit', config : { scrollable : true, fullscreen: true, items: [ { xtype: 'textfield', name : 'member', label: 'member' }, { xtype: 'textfield', name : 'firstname', label: 'firstname' }, { xtype: 'textfield', name : 'lastname', label: 'lastname' } ] } }); </code></pre> <p>Controller</p> <pre><code>onCV_FamilyListItemTap : function(dataview, index, target, record, e, options) { this.getMain().push( { xtype : 'CV_FamilyEdit', title : record.data.firstname+" "+record.data.lastname, data : record.data }); } </code></pre> <p>............................................................ ............................................................</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