Hybrid View

  1. #1
    Ext JS Premium Member
    Join Date
    Apr 2011
    Location
    Dallas, TX
    Posts
    204
    Vote Rating
    2
    Justin Noel is on a distinguished road

      0  

    Default Must Change afterRender to beforeRender

    Must Change afterRender to beforeRender


    In the sticky notes, you've asked us to identify code changes required to get layouts to work in 4.1.

    I've got an issue with migrating from 4.0.7 to 4.1b2. The "afterRender" event does not seem to work the same. It severely ruins the layout.

    Here is what 4.0.7 looks like :


    crud_4.0.7.jpg

    Here is the exact same code with 4.1b2.
    crud_4.1b2.jpg

    Changing any "afterRender" references to "beforeRender" SORT of fixes the problem. The screen now lays out properly. However, my main toolbar looses all background coloring. See this image:

    crud_toolbar_problem.jpg

    You can find a complete working sample of this code on Github @ https://github.com/calendee/Ext-JS-4.X-CRUD-Demo . NOTE : This code will no longer work with 4.0.7 because of changing "afterRender" to "beforeRender".

    Also note that this layout problem will exist even if you put no supplemental code in the "afterRendor". Simply referencing afterRender causes the layout to fail.

    FYI : Here is the exact file that had to be changed to support 4.1b2 : https://github.com/calendee/Ext-JS-4...mentToolbar.js
    Attached Images
    Last edited by Justin Noel; 19 Feb 2012 at 4:43 PM. Reason: Add file information.

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,581
    Vote Rating
    317
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    You aren't using callParent in your beforeRender/afterRender. I suspect that what's happened is that the overridden method was empty in 4.0.7 so you could get away with a missing callParent but in 4.1 it does some important layout steps so it's causing havoc.

  3. #3
    Ext JS Premium Member
    Join Date
    Apr 2011
    Location
    Dallas, TX
    Posts
    204
    Vote Rating
    2
    Justin Noel is on a distinguished road

      0  

    Default Resolved

    Resolved


    Skirtle,

    You're a genius! Thank you. That did solve the problem.

    New code :

    Code:
        afterRender    : function() {
            
            custPanel = Ext.ComponentQuery.query('CustomerManagement');
            custLayout = custPanel[0].getLayout();
            this.callParent(arguments);
        }
    Thanks for the prompt reply.

    Justin

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