1. #1
    Sencha User
    Join Date
    Feb 2012
    Location
    Paris
    Posts
    7
    Vote Rating
    0
    ferreol.robert is on a distinguished road

      0  

    Default Answered: Combobox use of afterBodyEl, afterLabelTextTpl

    Answered: Combobox use of afterBodyEl, afterLabelTextTpl


    Hi,


    I tried to used afterBodyEl, afterLabelTextTpl, etc. without success.


    I have save my attempt here http://jsfiddle.net/EFFMA/

    Has someone already used those properties with success ?

    Thanks

  2. Looking at the source, in order for afterBodyEl to be used you must have msgTarget = 'side':

    Code:
    var states = Ext.create('Ext.data.Store', {
        fields : ['abbr', 'name'],
        data   : [
            {"abbr" : "AL", "name" : "Alabama"},
            {"abbr" : "AK", "name" : "Alaska"},
            {"abbr" : "AZ", "name" : "Arizona"}
        ]
    });
    
    Ext.create('Ext.form.ComboBox', {
        fieldLabel        : 'Choose State',
        store             : states,
        queryMode         : 'local',
        displayField      : 'name',
        valueField        : 'abbr',
        afterBodyEl       : 'Test',
        msgTarget         : 'side',
        afterLabelTextTpl : 'Test 2',
        renderTo          : Ext.getBody()
    });
    Also the afterLabelTextTpl is also showing up in this simple test using 4.1.2

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,684
    Vote Rating
    435
    Answers
    3111
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Looking at the source, in order for afterBodyEl to be used you must have msgTarget = 'side':

    Code:
    var states = Ext.create('Ext.data.Store', {
        fields : ['abbr', 'name'],
        data   : [
            {"abbr" : "AL", "name" : "Alabama"},
            {"abbr" : "AK", "name" : "Alaska"},
            {"abbr" : "AZ", "name" : "Arizona"}
        ]
    });
    
    Ext.create('Ext.form.ComboBox', {
        fieldLabel        : 'Choose State',
        store             : states,
        queryMode         : 'local',
        displayField      : 'name',
        valueField        : 'abbr',
        afterBodyEl       : 'Test',
        msgTarget         : 'side',
        afterLabelTextTpl : 'Test 2',
        renderTo          : Ext.getBody()
    });
    Also the afterLabelTextTpl is also showing up in this simple test using 4.1.2
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha Premium Member
    Join Date
    Dec 2012
    Location
    Moscow
    Posts
    4
    Vote Rating
    0
    bambam is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    Looking at the source, in order for afterBodyEl to be used you must have msgTarget = 'side'
    Sorry, but I can't understand how msgTarget = 'side' helps to use afterBodyEl config.

    If we'll go jsfiddle and run your example, we'll see afterLabelTextTpl is working, but not afterBodyEl.

    (Sorry if my English doesn't let me understand your explaining)