Hi
My container to put the list in
Here is my controller
DataView not registering itemtap event
I would like to add a itemtap event on my dataview horizontal list.
I am not getting any response when I tap on the list.
Could someone please tell me what I am missing.
Thanks
Jim
My List
Code:
Ext.define( 'Styles.view.Beginning', {
extend: 'Ext.Container',
xtype: 'beginninglist',
requires:['Styles.store.Beginning'],
config: {
title:'Beginning',
iconCls: 'star',
layout:{
type:'vbox',
pack: 'center'
},
items:[
{
//give it an xtype of list for the list component
xtype: 'dataview',
height: 250,
scrollable: 'horizontal',
directionLock: true,
inline: {
wrap: false
},
//set the itemtpl to show the fields for the store
itemTpl: '<img src="{image}"> <div>{name}</div>',
//bind the store to this list
store: 'Beginning'
}
]
}
});
My container to put the list in
Code:
Ext.define('Styles.view.BeginContainer', {
extend: 'Ext.navigation.View',
xtype:'beginContainer',
requires: ['Ext.TitleBar',
'Styles.view.Beginning',
'Styles.view.BeginningDetail',
'Styles.view.Advance'],
config: {
title:'Beginning Styles',
iconCls:'team',
items: [
{ xtype: 'beginninglist',},
]
}
});
Here is my controller
Code:
Ext.define( 'Styles.controller.Main', {
extend:'Ext.app.Controller',
requires: [
'Styles.view.Boogaloo',
'Styles.view.Dynarama',
'Styles.view.Cobra2',
'Styles.view.Cobra1',
],
config:{
refs: {
BeginContainer: 'beginContainer'
},
control: {
'beginninglist':{
itemtap: function(dataview, index, target, record, e, eOpts){
this.getBeginContainer().push( {
xtype: record.data.xtype});
}
}
},
}
});
DataView not registering itemtap event
Aucun commentaire:
Enregistrer un commentaire