PDA

View Full Version : Error Ext.getCmp("razao_social").hideLabel is not a function



Rafael
25 Apr 2009, 9:32 AM
Ext.getCmp("razao_social").hideLabel is not a function


Ext.getCmp('razao_social').hideLabel(true);

evant
26 Apr 2009, 2:00 AM
There is no hideLabel method. You can't just make up methods and expect them to work.

Rafael
26 Apr 2009, 6:45 PM
man i need to hide a fieldLabel, how to do ?

vikaskapoor
26 Apr 2009, 10:35 PM
use hideLabel: true when creating object

Condor
26 Apr 2009, 10:53 PM
I think you are looking for this bugfix (http://www.extjs.com/forum/showthread.php?p=120152#post120152) (it automatically hides the label when hiding the field).

Rafael
27 Apr 2009, 6:13 AM
Condor i use this bugfix but in version 3.0 have error :


ct is null
ct.dom.insertBefore(this.el.dom, position);

Condor
27 Apr 2009, 7:32 AM
FormLayout changed in Ext 3.0, so you need:

Ext.override(Ext.layout.FormLayout, {
renderItem : function(c, position, target){
if(c && !c.rendered && (c.isFormField || c.fieldLabel) && c.inputType != 'hidden'){
var args = this.getTemplateArgs(c);
if(typeof position == 'number'){
position = target.dom.childNodes[position] || null;
}
if(position){
c.formItem = this.fieldTpl.insertBefore(position, args, true);
}else{
c.formItem = this.fieldTpl.append(target, args, true);
}
c.actionMode = 'formItem';
c.render('x-form-el-'+c.id);
c.container = c.formItem;
c.actionMode = 'container';
}else {
Ext.layout.FormLayout.superclass.renderItem.apply(this, arguments);
}
}
});
Ext.override(Ext.form.TriggerField, {
actionMode: 'wrap',
onShow: Ext.form.TriggerField.superclass.onShow,
onHide: Ext.form.TriggerField.superclass.onHide
});
Ext.override(Ext.form.Checkbox, {
actionMode: 'wrap',
getActionEl: Ext.form.Checkbox.superclass.getActionEl
});

Rafael
27 Apr 2009, 8:01 AM
Condor it is great.

Thank you

---- This override have a probleman

Rafael
27 Apr 2009, 7:24 PM
when the datefield is desabled the text into this datefield is white and dont see .