1. #1
    Sencha Premium Member
    Join Date
    Aug 2008
    Location
    USA
    Posts
    61
    Vote Rating
    1
    Podlipensky is on a distinguished road

      0  

    Default Templating Ext.field.Field

    Templating Ext.field.Field


    I'd like to implement custom field, and specified tpl property on it, but I noted that Ext.AbstractComponent is looking for renderTemplate. So what should I use? (i've tried both actually and got different errors there)
    My recent commitment into Sencha community:
    Star Rating Field: https://github.com/podlipensky/Ext.ux.touch.Rating
    Sencha Articles on my blog: http://podlipensky.com

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,731
    Vote Rating
    754
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Ext.field.Field uses the getElementConfig method route where it returns an object of element structure to create.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

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

  3. #3
    Sencha Premium Member
    Join Date
    Aug 2008
    Location
    USA
    Posts
    61
    Vote Rating
    1
    Podlipensky is on a distinguished road

      0  

    Default


    In other words, there is no ability to customize field's template, right?
    My recent commitment into Sencha community:
    Star Rating Field: https://github.com/podlipensky/Ext.ux.touch.Rating
    Sencha Articles on my blog: http://podlipensky.com

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,731
    Vote Rating
    754
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Sure there is. Override this method to add or remove what you need.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

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

  5. #5
    Sencha Premium Member
    Join Date
    Aug 2008
    Location
    USA
    Posts
    61
    Vote Rating
    1
    Podlipensky is on a distinguished road

      0  

    Default


    Mmm, I feel myself not comfortable when I need to override method of one of the base classes.
    Anyway, what kind of config should I return, I've tried this one:
    I've tried such approach:
    Code:
    getElementConfig: function() {
            var prefix = Ext.baseCSSPrefix;
    
    
            return {
                reference: 'element',
                className: 'x-container',
                children: [
                    {
                        reference: 'label',
                        cls: prefix + 'form-label',
                        children: [{
                            reference: 'labelspan',
                            tag: 'span'
                        }]
                    },
                    {
                        reference: 'renderTemplate',
                        tag: 'div',
                        tpl: this.tpl,
                        data: this.renderData,
                        cls: prefix + 'component-outer'
                    }
                ]
            };
        },
    But it simply makes tpl and data as custom properties on field's dom element. What kind of config it is? Is it different from what we had in Sencha 1.x?

    But it makes tpl and data as custom properties on dom element. So, what kind of config it is?
    My recent commitment into Sencha community:
    Star Rating Field: https://github.com/podlipensky/Ext.ux.touch.Rating
    Sencha Articles on my blog: http://podlipensky.com

  6. #6
    Sencha Premium Member
    Join Date
    Aug 2008
    Location
    USA
    Posts
    61
    Vote Rating
    1
    Podlipensky is on a distinguished road

      0  

    Default


    ...and what type of object renderTemplate should be? It has cloneNode method, but Ext.XTemplate class doesn't have such object? Thanks.
    My recent commitment into Sencha community:
    Star Rating Field: https://github.com/podlipensky/Ext.ux.touch.Rating
    Sencha Articles on my blog: http://podlipensky.com

  7. #7
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Omaha, NE
    Posts
    529
    Vote Rating
    17
    estesbubba will become famous soon enough

      0  

    Default


    Did you have any luck on this? I'm having the same problem myself converting a 1.1 custom field to 2.0.

    http://www.sencha.com/forum/showthre...rom-1.1-to-2.0

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar