extjs - Sencha touch custom list into viewport -


i having problems adding custom list view viewport. if use example documentation lines below works fine

ext.viewport.add(ext.create('ext.list', { store: {     fields: ['name'],     data: [         {name: 'cowper'},         {name: 'everett'},         {name: 'university'},         {name: 'forest'}     ] },  itemtpl: '{name}' })); 

if define own list , try add it not work. doing wrong?

ext.define('mylist', {     extend: 'ext.list',     store:      { fields: ['name'],       data: [{name: 'cowper'},             {name: 'everett'},             {name: 'university'},             {name: 'forest'}],     },     itemtpl: '{name}'}); ext.viewport.add(ext.create('mylist')); 

when define view, should put view configuration inside config.

try this

ext.define('mylist',{         extend: 'ext.list',         config: {             store: {                  fields: ['name'],                 data: [{name: 'cowper'},                 {name: 'everett'},                 {name: 'university'},                 {name: 'forest'}],             },             itemtpl: '{name}'        } });  ext.viewport.add(ext.create('mylist')); 

Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -