1. #1
    Sencha Premium Member
    Join Date
    Jan 2013
    Posts
    62
    Answers
    6
    Vote Rating
    5
    AssetWorks is on a distinguished road

      0  

    Default Answered: build the name config to reuse form

    Answered: build the name config to reuse form


    I have an address class that I want to reuse. but I want to build the name in each field to have a prefix and so when I call that xtype I want to be able to pass in this prefix so that each time it matches the field.
    Code:
        Ext.define('myForm',{
            extends:'Ext.form.Panel',
            prefix:'ShippingAddress', //<--------I want to define my prefix here
            alias:'widget.myform',
            items:[
                 {xtype: 'textfield', name: {prefix}+'Line1'},
                 {xtype: 'textfield', name: {prefix}+'City'},
                 {xtype: 'textfield', name: {prefix}+'State'}
                 // .....etc... 
        });
    so I can do this later:
    Code:
        ....
         xtype: 'myform',
         prefix: 'BillingAddress'

  2. This is possible (you need to define items in initComponent method), but I advise to factor out address to a separate entity and then have a collection of them/ several hasOne associations.

  3. #2
    Sencha User
    Join Date
    Sep 2011
    Posts
    568
    Answers
    58
    Vote Rating
    69
    ettavolt is just really nice ettavolt is just really nice ettavolt is just really nice ettavolt is just really nice

      0  

    Default


    This is possible (you need to define items in initComponent method), but I advise to factor out address to a separate entity and then have a collection of them/ several hasOne associations.

Thread Participants: 1

Tags for this Thread

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