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
Post a Comment