1. #1
    Ext User
    Join Date
    Oct 2007
    Posts
    1
    Vote Rating
    0
    charlesaldrin is on a distinguished road

      0  

    Default New Component in ext

    New Component in ext


    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.
    Last edited by mystix; 28 Oct 2007 at 10:32 PM. Reason: moved to 1.x Help from 1.x Bugs

  2. #2
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
    mystix will become famous soon enough

      0  

    Default


    pls read http://www.sencha.com/forum/showthread.php?t=8887 before posting in bugs. thanks.

  3. #3
    Sencha User kubens's Avatar
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    136
    Vote Rating
    0
    kubens is on a distinguished road

      0  

    Default


    In your source are some confusing errors, I assume that you made an error durring your post... However if you are interested to establish your own classes then try this:

    Code:
    Ext.namespace('Ext.ux.wak');
    Ext.ux.wak.TextField = Ext.extend(Ext.form.TextField, {
    
      emptyText: 'This field is mandatory',
    
      initComponent: function(){
        Ext.ux.wak.TextField.superclass.initComponent.call(this);
      }
    });
    
    Ext.onReady(function(){
      
      var frmTest = new Ext.FormPanel
      ({
          labelWidth: 75,
          url:'#',
          frame:true,
          title: 'Simple Form',
          bodyStyle:'padding:5px 5px 0',
          width: 350,
          defaults: {width: 230},
          items:
          [
            new Ext.ux.wak.TextField
            ({
              fieldLabel: 'Field 1',
              name: 'f1'
            }),
            new Ext.ux.wak.TextField
            ({
              fieldLabel: 'Field 2',
              name: 'f2'
            })
          ]
      });
      frmTest.render(document.body);
    
    });
    Br
    Wolfgang

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi