utpal_brsh
1 Jul 2010, 10:29 PM
Hi
I created a xtype to use in my form like following.Here I combined two numberfield and I also create an function two get these two value together.
appdatetime=Ext.extend(Ext.Panel,{
initComponent: function() {
Ext.apply(this, {
width: 70,
frame: false,
border: false,
items:[{
id:'definedTimeInDate',
name:'definedTimeInDate',
xtype:'numberfield',
width:40,
height:20,
maxLength:3,
minLenght:3
},{
id:'definedTimeInHours',
name:'definedTimeDateInHours',
xtype:'numberfield',
width:30,
height:20,
maxLength:2 ,
minLenght:2
}
]
});
appdatetime.superclass.initComponent.call(this);
},
getDefinedTermValue:function(){
return Ext.getCmp('definedTimeDateId').getValue()+""+Ext.getCmp('definedTimeDateHours').getValue();
}
});
Ext.reg('appdatetime',appdatetime);
In my form I use this xtype using the following code
{
id:'defined_term_id',
name:'defined_term_id',
xtype:'appdatetime'
}
Now while i try to get these two value using Ext.getCmp('defined_term_id').getDefinedTermValue() i m getting BLANK :(..Please tell me where is the mistake?? and How to solve this??
I created a xtype to use in my form like following.Here I combined two numberfield and I also create an function two get these two value together.
appdatetime=Ext.extend(Ext.Panel,{
initComponent: function() {
Ext.apply(this, {
width: 70,
frame: false,
border: false,
items:[{
id:'definedTimeInDate',
name:'definedTimeInDate',
xtype:'numberfield',
width:40,
height:20,
maxLength:3,
minLenght:3
},{
id:'definedTimeInHours',
name:'definedTimeDateInHours',
xtype:'numberfield',
width:30,
height:20,
maxLength:2 ,
minLenght:2
}
]
});
appdatetime.superclass.initComponent.call(this);
},
getDefinedTermValue:function(){
return Ext.getCmp('definedTimeDateId').getValue()+""+Ext.getCmp('definedTimeDateHours').getValue();
}
});
Ext.reg('appdatetime',appdatetime);
In my form I use this xtype using the following code
{
id:'defined_term_id',
name:'defined_term_id',
xtype:'appdatetime'
}
Now while i try to get these two value using Ext.getCmp('defined_term_id').getDefinedTermValue() i m getting BLANK :(..Please tell me where is the mistake?? and How to solve this??