Hello All,
I have symmaryView in which mupltple buttons are there.
For certain scenario (like type is ACCOUNT) then it should auto click the createActivity button just after page load ( means no user intervention to click the button).
My Code:
Ext.define('view.account.AccountSummaryView', {
extend : 'view.entity.EntitySummaryView',
xtype : 'accountSummaryView',
config : {
..
..
buttons : [
{
xtype: 'createActivityButton',
hidden : true
},
{
xtype: 'createCommentButton',
hidden : true
}
]
},
..
..
updateData : function(account) {
var me = this;
var btnCreateActivity = me.down('createActivityButton');
if (btnCreateActivity) {
btnCreateActivity.setEntity({
ssiId : account['ssiId'],
name : account['name'],
type : SalesCenter.Const.ENTITY_TYPE.ACCOUNT
});
btnCreateActivity.show();
btnCreateActivity.bodyElement.dom.click(); //This is where I think load finishes so I called button click even but its not firing.
}
}
destroy : function() {
var me = this;
var ebooksWrapperEls = me.element.query('.ebooks-wrapper');
Ext.Array.each(ebooksWrapperEls, function(ebooksWrapperEl) {
Ext.get(ebooksWrapperEl).un('tap', me.onEbookTap, me);
});
me.callParent(arguments);
}
});
Can you please guide me
1. if the function I am using to fire click event is right?
2. Whether I put that in right place?
3. or is there any funciton such as afterLoad() available in which I can call the fireevent?
Regards,
Sidd