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
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,337
    Vote Rating
    75
    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,115
    Vote Rating
    507
    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
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,337
    Vote Rating
    75
    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,483
    Vote Rating
    35
    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.

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