Threaded View
-
27 Nov 2012 4:48 AM #1
Unanswered: Uncaught Error: Ext.setup has already been called before
Unanswered: Uncaught Error: Ext.setup has already been called before
Hallo i have a program, which has a Login Panel and after the Login it has to show me another View. I would like to switch after login to the Ext.ux.touch.grid.
https://github.com/mitchellsimoens/Ext.ux.touch.grid
i have a LoginView. a Controller which looks like:
Ext.define("Login.controller.MainController",{
extend:'Ext.app.Controller',
views:['LoginView', 'HauptSeite', 'index'],
//--------------------------------------------------------refs, control
refs:[{ loginSeite :'#loginForm'}],
init: function(){
console.log('inited');
this.control({
'button[action=submitkontakt]': {
tap:'submitkontaktForm'
}
});
},
//--------------------------------------------------------refs, control
//definition von "submitgridForm"
submitkontaktForm:function(btn){
var form=btn.up('formpanel');
//console.log(form);
form.submit({
url:'login.php',
success : function(form, res){
console.log('right');
Ext.Viewport.setActiveItem(Ext.create('LoginAufGrid.view.index'));
alert('You are logged in');
},
failure : function(form, res){
console.log('false');
alert('wrong Login');
}
})
},
});
this part: Ext.Viewport.setActiveItem(Ext.create('LoginAufGrid.view.index')); should give a new View of Ext.ux.touch.grid.
I try to change the index.js of Ext.ux.touch.grid, so maybe it can work, but i can't find a solution.
I get allways the Error: Uncaught Error: Ext.setup has already been called before.
How can i change the part of :
Please help meExt.setup({
onReady:function(){

Thanks


Reply With Quote