
Originally Posted by
StuartAshworth
Try adding a handler to the view's destroy method with a debugger statement in it. It sounds like the view is being destroyed automatically since the upgrade - that might help to figure out where the destroy is originating from.
Thanks for this idea. I debugged ext codes and figure out the error.
In grid's toolbar there's a field:
Code:
{
xtype: 'textfield',
flex: 1,
reference: 'user',
fieldLabel: 'User',
bind: {
value: '{usuarioSearched}',
readOnly: !Ext.$('app-main')[0].getViewModel().get('permissoes.userAdmin'),
fieldStyle: '{userFieldStyle}'
}
}
Note readOnly property in bind. In 6.0.2 version it works but it doesn't in 6.2.0. Ok, it's a bad pratice. Now I did the following:
Code:
{
xtype: 'textfield',
flex: 1,
reference: 'user',
fieldLabel: 'User',
bind: {
value: '{usuarioSearched}',
readOnly: '{userNotAdmin}',
fieldStyle: '{userFieldStyle}'
}
}
And in viewModel I added the formula:
Code:
userNotAdmin: function(get){
return !Ext.$('app-main')[0].getViewModel().get('permissoes.userAdmin');
}
Is someone front this issue, maybe it can help.