Davi Baldin
21 Jul 2007, 12:18 PM
In specific context, i need to reder dynamic form with diferents fields. So with this code, i recreate without problem the form every time...
this code worksforme:
createForm : function(paramType,paramList) {
if(form) {
Ext.get('paramForm').remove();
form = null;
}
form = new Ext.form.Form({id: 'paramForm'});
and the object
ParametersEditorDialog = function(){
var form;
var dialog;
return {
createForm : function(paramType,paramList) {
if(form) {
Ext.get('paramForm').remove();
form = null;
}
form = new Ext.form.Form({id: 'paramForm'});
form.add(
new Ext.form.TextField({
fieldLabel: paramType,
name: 'first',
width:175,
allowBlank:false,
id: 'f1'
}));
//Render
form.render('parameters-dialog-form');
}
//... cuted here
};
//Function end
}();
thats is !!!
Davi
this code worksforme:
createForm : function(paramType,paramList) {
if(form) {
Ext.get('paramForm').remove();
form = null;
}
form = new Ext.form.Form({id: 'paramForm'});
and the object
ParametersEditorDialog = function(){
var form;
var dialog;
return {
createForm : function(paramType,paramList) {
if(form) {
Ext.get('paramForm').remove();
form = null;
}
form = new Ext.form.Form({id: 'paramForm'});
form.add(
new Ext.form.TextField({
fieldLabel: paramType,
name: 'first',
width:175,
allowBlank:false,
id: 'f1'
}));
//Render
form.render('parameters-dialog-form');
}
//... cuted here
};
//Function end
}();
thats is !!!
Davi