1. #1
    Sencha User
    Join Date
    Dec 2009
    Posts
    59
    Answers
    1
    Vote Rating
    0
    Werzi2001 is on a distinguished road

      0  

    Default Answered: Override onRender

    Answered: Override onRender


    Hi,

    i would like to override the "onRender" method in order to insert some html and render the field to that html.

    Code:
    Ext.define('Ext.ux.form.FileField', {
        extend: 'Ext.form.field.File',
        
        alias: 'widget.uxfilefield',
        
        // private
        onRender: function(ct, position) {
            /* create placeholder */
            var html = '<table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';
            var element = ct.insertSibling({
                html: html
            }, null, true);
            
            /* get places */
            var places = Ext.DomQuery.select('td', element);
            
            /* render field */
            this.callParent(places[0], position);
        }
    });
    This is my current code but it doesn't work and i can't figure out why. The html gets inserted but the callParent seems to fail.

    Could anybody of you give me a hint what the error is?

    Yours
    Thomas

  2. Hi,

    thanks for your reply. I couldn't use "arguments" as i want to change the ct-parameter but
    Code:
    this.callParent([places[0], position]);
    did the trick.

    Yours
    Thomas

  3. #2
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,108
    Answers
    83
    Vote Rating
    31
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    the input of callParent is an Array

    try callParent(arguments)

  4. #3
    Sencha User
    Join Date
    Dec 2009
    Posts
    59
    Answers
    1
    Vote Rating
    0
    Werzi2001 is on a distinguished road

      0  

    Default


    Hi,

    thanks for your reply. I couldn't use "arguments" as i want to change the ct-parameter but
    Code:
    this.callParent([places[0], position]);
    did the trick.

    Yours
    Thomas

Thread Participants: 1

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