PDA

View Full Version : Form Showing on top with superclass.initComponent.call



mmourtada
28 Jun 2011, 7:08 AM
I need some help please, on how to make the below code not to show unless I click on the button.



CarTechniks.Mobile.Appointment = Ext.extend(Ext.Panel, {
//
initComponent: function(){

var form;
.....
.....

var formBase = {
scroll: 'vertical',
id: 'form',
url : 'Appointment.php',
standardSubmit : false,
items: [{
.....
.....
listeners : {
submit : function(form, result){
console.log('success', Ext.toArray(arguments));
},
exception : function(form, result){
console.log('failure', Ext.toArray(arguments));
}
},
dockedItems: [
{
xtype: 'toolbar',
dock: 'bottom',
items: [
{
......
......
if (Ext.is.Phone) {
formBase.fullscreen = true;
} else {
Ext.apply(formBase, {
autoRender: true,
floating: true,
modal: true,
centered: true,
hideOnMaskTap: false,
height: 385,
width: 480
});
}

form = new Ext.form.FormPanel(formBase);
form.show();

// how can I call this function?? because form.show() display the form on top of everthing

CarTechniks.Mobile.Appointment.superclass.initComponent.call(this);
} //end
});
Ext.reg('appointment', CarTechniks.Mobile.Appointment); // register it