I have created an instance class from Ext.Component to use the ul tag.
here the the demo
and this is how i use my contentMenu :
{
xtype : "contentmenu"
title : "Data Master",
items : [{
id : "action-siswa",
iconCls : "icon-monitor",
text : "Siswa",
handler : function(){
console.info("aaaa");
}
},{
id : "action-sekolah",
iconCls : "icon-monitor",
text : "Sekolah",
handler : function(){
console.info("aaaa");
}
}]
}]
how to execute my handler ????
i want to execute my handler inside method doAction..
Here is your situation your contentmenu widget creating their items as dom and their handler property can’t been seen as the items is deleted in the initComponent section.
I know why you need to do this because you need a clean template render for panel item. So the solution for this problem is by using an explicit contentmenu items property that can’t be interference by rendering process in initComponent but can be accessed in doAction.
See code bellow:
Maybe this help you