extjs - Nested List view to show other -
here code showing list using sencha. when click any row how make visible detailed view.i have tried following link sencha nested list way no response.
list view
var tab= ext.create('ext.list', { width: 320, height: 320, store: { fields: ['ext_xtype','imgurl','arimg'], data: [{ ext_xtype: 'harry potter 4', imgurl:'bo.png', arimg:'arrow.png' },{ ext_xtype: 'iphone5 64gb', imgurl:'mo.png', arimg:'arrow.png' },{ ext_xtype: 'hill figure', imgurl:'wa.png', arimg:'arrow.png' }] }, itemtpl: '<img src="{imgurl}" width="35" heigh="35"></img><span>   {ext_xtype}<img src="{arimg}" width="25" height="25" align="right"></img>' });
detailed view
var sprfolievu = { standardsubmit : false, items: [{ xtype: 'fieldset', title: '', items: [ { xtype: 'container', layout: 'vbox', title: '', items: [{ xtype: 'container', items: [{ xtype: 'container', margin: 10, layout: 'hbox', items: [logo,{ xtype: 'label', html: '   ' } ] },] },tablevuu ] } ] }] }
whats problem code?please me sort out
your not following mvc, code looks ugly.
i have done modification sprfolievuand , added button.
var sprfolievu = { standardsubmit : false, items: [{ xtype : 'toolbar', items : [{ ui : 'back', text : 'back', handler : function(){ ext.viewport.setactiveitem(list); } }], },{ xtype: 'fieldset', title: '', items: [{ xtype: 'container', layout: 'vbox', title: '', items: [{ xtype: 'container', items: [{ xtype: 'container', margin: 10, layout: 'hbox', items: [{ xtype: 'label', html: '   ' }] }] }] }] }] };
also done changes in list.
var list = ext.create('ext.list', { store: { fields: ['ext_xtype','imgurl','arimg'], data: [{ ext_xtype: 'harry potter 4', imgurl:'bo.png', arimg:'arrow.png' },{ ext_xtype: 'iphone5 64gb', imgurl:'mo.png', arimg:'arrow.png' },{ ext_xtype: 'hill figure', imgurl:'wa.png', arimg:'arrow.png' }] }, itemtpl: ['<img src="{imgurl}" width="25" heigh="25">'+ '</img><span>{ext_xtype}</span>'+ '<img src="{arimg}" width="25" height="25" align="right"></img>'].join(), listeners : { itemtap: function(list, index, target, record, e, eopts ) { ext.viewport.setactiveitem(sprfolievu); } } }); ext.viewport.add(list); ext.viewport.add(sprfolievu);
Comments
Post a Comment