-
FormPanel error
Hi i will show the code, so any1 of you can help me... i am a litle lost with ext 4.0...
Code in LoginWindow.js
Code:
Ext.define('GUI.LoginWindow', {
extend: 'Ext.window.Window',
alternateClassName: 'LoginWindow',
initComponent: function() {
this.form = Ext.create('Ext.form.FormPanel',{
frame : true
,hideBorders : true
,scope : this
,standardSubmit : true
,labelWidth : 80
,autoHeight : true
,autoWidth : true
,url : 'login.php'
,defaultType : 'textfield'
,items : [{
fieldLabel : 'Login',
name : 'login',
allowBlank : false
},{
fieldLabel : 'Senha',
name : 'password',
inputType : 'password',
allowBlank : false
}]
,buttons : [{
text : 'Acessar',
formBind : true,
scope : this,
handler : function(){
this.form.getForm().submit({
method : 'POST'
});
}
}]
});
Ext.apply(this, {
display : 'fit'
,height : 125
,width : 250
,closable : false
,resizable : false
,items : [this.form]
});
GUI.LoginWindow.superclass.initComponent.apply(this, arguments);
}
});
My code on index.php
Code:
<link rel="stylesheet" type="text/css" href="_js/_ext/resources/css/ext-all.css" />
<script type="text/javascript" src="_js/_ext/ext-core-debug.js"></script>
<script type="text/javascript" src="_js/_ext/ext-all-debug.js"></script>
<script type="text/javascript" src="_js/_ext/ext-Loader.js"></script>
ext-Loader.js -> just defines the paths of the Require and his configs...
<script type="text/javascript" >
Ext.onReady(function(){
Ext.require('GUI.LoginWindow', function () { var login = new LoginWindow(); login.title = '<?php echo $_SESSION['msg']; ?>'; login.show(); });
});
</script>
The window shows but without nothing inside it... any problem on the code, i am missing something????? Please any help wold be really apreaciated...
Tnx for help people...
-
Still trying...
Hello i am still trying to solve the error... nothing yet... any1 can help me with this? please, any hint will be more than welcome...
My brain is starting to complain... :((
-
Solved IT...
I dont know WHY... But... i missed the LAYOUT propertie and no erros was displayed... only the form was invisible...
Tnx peopple! :>