charlesaldrin
28 Oct 2007, 10:29 PM
hi all,
Iam very new to ext technology. i would like to add a new custumized component to ext (to learn ext structure & style of coding). so i just tried to make a copy of TextField, by copying it and renamed it to TextFiels1. But when i call this component in jsp shows error like TextFiels1 is not a cunstructor.
following are the file contents.
TextField1.js in lib/ext/source/widget/form
Ext.form.TextField1 = function(config){
Ext.form.TextField1.superclass.constructor.call(this, config);
//like this i have edited all 'Ext.form.TextField' to 'Ext.form.TextField1'
.
.
Ext.reg('textfield', Ext.form.TextField1);
modules/myModule/script/userList.js
modules.myModule.UserList=function(){
var pagingToolBar=new Ext.PagingToolbar({
store: store,
pageSize: 10,
displayInfo: true,
displayMsg: 'Topics {0} - {1} of {2}',
emptyMsg: "No topics to display"
});
grid = new Ext.grid.GridPanel({
el:'userListTable',
ds: store,
cm: cModel,
bbar: tool,
tbar:pagingToolBar,
height:280,
width:650,
loadMask: true
});
return{
init :function(){
var charField=new Ext.form.Text(Form1{emptyText: "Enter User Name or email"});//error :Ext.form.TextFiels1 is not a constructor pagingToolBar.addField(charField);
},
};
}();
Ext.onReady(modules.myModule.UserList.init(),modules.myModule.UserList);
Please send me some solution to this probles.
Iam very new to ext technology. i would like to add a new custumized component to ext (to learn ext structure & style of coding). so i just tried to make a copy of TextField, by copying it and renamed it to TextFiels1. But when i call this component in jsp shows error like TextFiels1 is not a cunstructor.
following are the file contents.
TextField1.js in lib/ext/source/widget/form
Ext.form.TextField1 = function(config){
Ext.form.TextField1.superclass.constructor.call(this, config);
//like this i have edited all 'Ext.form.TextField' to 'Ext.form.TextField1'
.
.
Ext.reg('textfield', Ext.form.TextField1);
modules/myModule/script/userList.js
modules.myModule.UserList=function(){
var pagingToolBar=new Ext.PagingToolbar({
store: store,
pageSize: 10,
displayInfo: true,
displayMsg: 'Topics {0} - {1} of {2}',
emptyMsg: "No topics to display"
});
grid = new Ext.grid.GridPanel({
el:'userListTable',
ds: store,
cm: cModel,
bbar: tool,
tbar:pagingToolBar,
height:280,
width:650,
loadMask: true
});
return{
init :function(){
var charField=new Ext.form.Text(Form1{emptyText: "Enter User Name or email"});//error :Ext.form.TextFiels1 is not a constructor pagingToolBar.addField(charField);
},
};
}();
Ext.onReady(modules.myModule.UserList.init(),modules.myModule.UserList);
Please send me some solution to this probles.