Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<pre><code>Ext.ns('abc', 'abc.panel', 'abc.store'); // Models _____________________________________________________________________ Ext.regModel('Artists', { fields: ['firstName', 'lastName'] }); // Stores _____________________________________________________________________ abc.store.Artists = new Ext.data.Store({ model: 'Artists', proxy: { type: 'ajax', url: 'http://localhost:8888/abc/stores/artists.json', reader: { type: 'json', root: 'artists' } }, sorters: 'lastName', getGroupString : function(record) { return record.get('lastName')[0]; }, autoLoad: true }); abc.artistDetail = new Ext.Panel({ id: 'detailpanel', tpl: 'Hello, {firstName}!', dockedItems: [ { xtype: 'toolbar', items: [{ text: 'back', ui: 'back', handler: function() { Ext.getCmp('artists').setActiveItem('artistList', {type:'slide', direction:'right'}); //updated code } }] } ] }); abc.artistList = new Ext.List({ title: 'Artists', store: abc.store.Artists, fullscreen: true, id: 'artistList', itemTpl: '&lt;div class="contact"&gt;{firstName} {lastName}&lt;/div&gt;', grouped: true, onItemDisclosure: function(record, btn, index) { abc.artistDetail.update(record.data); Ext.getCmp('artists').setActiveItem('detailpanel'); //updated code } }); abc.panel.Artists = Ext.extend(Ext.Panel, { id: 'artists', title: 'Artists', layout: 'card', fullscreen: true, cardSwitchAnimation: 'slide', iconCls: 'artists', items: [abc.artistList, abc.artistDetail], }); abcPrimavera = new Ext.Application({ name: "abcApp", onReady: function () { var app = new Ext.TabPanel({ fullscreen: true, animation: false, tabBar: { dock: 'bottom', layout: { pack: 'center' } }, items: [ new abc.panel.Artists()] }); } }); </code></pre> <p>Two parts of the code updated above - was using the wrong syntax to define the itemDisclosure.</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