PDA

View Full Version : a little problem with auto loading form



emils
25 Jan 2011, 12:32 AM
Hi,

I am trying to put dinamicly a form into a tab panel with this code:


function ShowFirmSettings(firmid) {
var newtab = Ext.getCmp('newdansklad-holder').add(FormFirmSet);
newtab.setTitle('Data');
};


This code is attached to the button. On the first click nothing happens, the form appears correctly in the second click.I am sure that I had such a problem, but I do not remember the decision ...

25 Jan 2011, 10:52 AM
try

function ShowFirmSettings(firmid) {
var newtab = Ext.getCmp('newdansklad-holder').add(FormFirmSet);
Ext.getCmp('newdansklad-holder').doLayout();
newtab.setTitle('Data');
};

emils
25 Jan 2011, 11:55 AM
try

function ShowFirmSettings(firmid) {
var newtab = Ext.getCmp('newdansklad-holder').add(FormFirmSet);
Ext.getCmp('newdansklad-holder').doLayout();
newtab.setTitle('Data');
};

thanks a lot! Problem was the wrong type of container :) I knew that happened to me before, but still lost a lot of time :)