Note that there are some explanatory texts on larger screens.

plurals
  1. POSencha Touch 2: How to create/show new view on list item tap
    primarykey
    data
    text
    <p>I have a List that I am populating dynamically, I want to create a new view and then display it(in the tab view) on the fly via a button tap on the item but I don't think I am going about it correctly, How can I correctly implement this?</p> <pre><code> Ext.Loader.setConfig({ enabled: true }); Ext.application({ name: 'MyApp', launch: function () { Ext.Viewport.add({ xclass: 'MyApp.view.Main' }); } }); Ext.define('MyApp.view.Main', { extend: 'Ext.TabPanel', config: { fullscreen: true, tabBarPosition: 'bottom', defaults: { styleHtmlContent: true }, items: [ {xtype:'schedulecard'}, {xtype: 'settingscard'} ] } }); var scheduleItems = Ext.create('Ext.data.Store', { storeId: 'schedulestore', fields: ['name', 'day'], sorters: 'day', grouper: { groupFn: function (record) { return record.get('day')[0]; } }, data: [ { name: 'Cowper', day: 'Monday' }, { name: 'Everett', day: 'Monday' }, { name: 'University', day: 'Tuesday' }, { name: 'Forest', day: 'Tuesday' } ] }); // create() Ext.define('MyApp.view.Schedule', { extend: 'Ext.List', xtype: 'schedulecard', grouped: true, config: { title: 'Schedule', iconCls: 'settings', store: 'schedulestore', itemTpl: '&lt;span style="font-weight:bold;"&gt;{name}&lt;/span&gt; {day}', listeners: { itemtap: function (list, index, item, evt) { **//In here is where I wish to to display new View** } }, items: [{ xtype: 'titlebar', docked: 'top', title: 'MyApp' }] } }); scheduleItems.add({ name: 'test', day: 'Wednesday' }); scheduleItems.add({ name: 'test', day: 'Wednesday' }); scheduleItems.add({ name: 'test', day: 'Wednesday' }); scheduleItems.add({ name: 'test', day: 'Wednesday' }); scheduleItems.add({ name: 'test', day: 'Thursday' }); scheduleItems.add({ name: 'test', day: 'Thursday' }); scheduleItems.add({ name: 'test', day: 'Thursday' }); scheduleItems.add({ name: 'test', day: 'Friday' }); scheduleItems.add({ name: 'test', day: 'Friday' }); Ext.define('MyApp.view.Settings', { extend: 'Ext.Panel', xtype: 'settingscard', config: { title: 'Settings', iconCls: 'settings', html: 'Settings new', items: [{ xtype: 'titlebar', docked: 'top', title: 'MyApp', items: [ { align: 'left', text: 'Back' }, { align: 'right', text: 'refresh' } ] }] } }); </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. 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