1. #1
    Ext User
    Join Date
    Jun 2008
    Location
    Joensuu, Finland
    Posts
    16
    Vote Rating
    0
    pafciu17 is on a distinguished road

      0  

    Default Re-render

    Re-render


    How in extjs can I re-render my component? I am extending Ext.BoxComponent and I want to re-render my object after calling setColor method. This is my code:
    Code:
    MyColorField = Ext.extend(Ext.BoxComponent,{
        color: 'FFFFFF',
        initComponent: function() {
            Ext.apply(this, {});
            MyColorField.superclass.initComponent.apply(this, arguments);
        },
        onRender: function(ct, position) {
            this.colorField = Ext.DomHelper.append(ct, {
                tag: 'div', 
                style:'border-style:solid; ' +
                        'border-width:1px; ' +
                        'border-color:#990000; ' +
                        'width:12px; ' +
                        'height:12px; ' +
                        'background-color: #'+ this.color
            });
            MyColorField.superclass.onRender.call(this, ct, position);
        },
        setColor: function(color) {
            this.color = color;
        },
        getColor: function() {
            return this.color;
        }
    })

  2. #2
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    79
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    why re-render?
    why not just set the CSS attribute?

  3. #3
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,833
    Vote Rating
    609
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Agreed with the above. Re-rendering is generally not supported.

    Why go through so much effort?
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  4. #4
    Ext User
    Join Date
    Jun 2008
    Location
    Joensuu, Finland
    Posts
    16
    Vote Rating
    0
    pafciu17 is on a distinguished road

      0  

    Default


    Thanks. I understand. But what happen if I edit a cell in EditorGridPanel? Isn't each cell rerender then?

  5. #5
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    79
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    you're comparing apples with bananas.

  6. #6
    Ext User
    Join Date
    Jun 2008
    Location
    Joensuu, Finland
    Posts
    16
    Vote Rating
    0
    pafciu17 is on a distinguished road

      0  

    Default


    Why? Please explain that.

  7. #7
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,501
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    render !== update

  8. #8
    Ext User
    Join Date
    Jun 2008
    Location
    Joensuu, Finland
    Posts
    16
    Vote Rating
    0
    pafciu17 is on a distinguished road

      0  

    Default


    Thanks.

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