1. #1
    Sencha User
    Join Date
    Dec 2009
    Posts
    64
    Answers
    1
    Vote Rating
    1
    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,114
    Answers
    83
    Vote Rating
    30
    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
    64
    Answers
    1
    Vote Rating
    1
    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

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