I don't think so
#1 is the easy one :
PHP Code:
Ext.define("MyApp.namespace.CustomItem",
{
extend:"Ext.Container",
config:{
layout:'hbox',
items:[
{xtype:'label',html:'damn!'},
{xtype:''button", action:'action1', hidden:true},
{xtype:''button", action:'action2', hidden:true}
]
},
initialize:function()
{
this.callParent(arguments);
//add custom behavior
this.label = this.down('label');
this.btn1 = this.down('button[action=action1]');
this.btn2 = this.down('button[action=action2]');
//swipe event ?!?!
this.label.on('tap', this.onLabelSwiped, this);
//tap buttons
this.btn1.on('tap',this.onAction1,this);
this.btn2.on('tap',this.onAction2,this);
},
//handlers
onLabelSwiped:function()
{
this.btn1.show();
this.btn2.show();
this.fireEvent('labelswiped'); //eventually
},
onAction1:function()
{
//your thing here
this.fireEvent('listitemaction1');
},
onAction2:function()
{
//your thing here
this.fireEvent('listitemaction2');
},
//entry points for the dataitem wrapper
// in your dataitem implementation
// datamap :{
// getComponent:{
// setLabel: 'model_field_for_label'
//}
//}
setLabel:function(value)
{
this.label.setHtml(value);
}
});
or not so easy...