PDA

View Full Version : [CLOSED] beforerender issue



tigran
17 Dec 2013, 11:33 PM
There is a serious bug in 4.2.1 with beforerender of components. Let's say i have a toolbar for panel with bunch of buttons. For one of them i am attaching (to configuration json config) beforerender event, which is going to return false to prevent that button rendering for some cases. When it happens, and i return false for that button, the other buttons are also not being rendered in toolbar. Also the beforerender event is being called 5-6 times for that button. I looked at source codes of render, but i found out complete mess there, so that instead of checking beforerender returned result first, there are some different kind of logic is being executed when let's say no 'el' is available for that component etc... Version ext-all-debug-w-comments.js line 40531. I assume that the problem is there... But please advise how i can solve my issue, buy sending some fix at least.

evant
17 Dec 2013, 11:40 PM
Please post a test case:

https://fiddle.sencha.com/#fiddle/28v

tigran
18 Dec 2013, 1:32 AM
Ext.application({
name : 'Fiddle',

launch : function() {
var ct = new Ext.panel.Panel({
renderTo: document.body,
layout: 'fit',
items: {
title: 'mypanel',
tbar: [
{
text: 'btn1' ,
handler: function() {

}
},
{
text: 'btn2',
listeners: {
beforerender: function() {
return false;
}
}
},
{
text: 'btn3' ,
handler: function() {

}
}, '-',
'aaa'
]
}
});
}
});

tigran
18 Dec 2013, 10:29 AM
Any updates on this topic?

LesJ
18 Dec 2013, 11:20 AM
Any updates on this topic?

Create a fiddle demo showing how this is failing and you will get a quick response.

tigran
19 Dec 2013, 6:47 AM
https://fiddle.sencha.com/#fiddle/2a9

tigran
20 Dec 2013, 5:47 AM
Ping...

Gary Schlosberg
23 Dec 2013, 9:17 AM
Thanks for the report! We have opened a bug in our bug tracker.

tigran
26 Dec 2013, 1:43 AM
Is there any temporary solution to this problem?