Results 1 to 2 of 2

Thread: Newbie Question > Render Panel only if condition is true

  1. #1
    Sencha User
    Join Date
    Nov 2012
    Vote Rating

    Default Newbie Question > Render Panel only if condition is true

    Hi Everyone,

    I am new to EXT JS...and the architect program. I was wondering if any of you could guide me as to how to add conditions to the rendering of panels. I want to render certain panels on my page ONLY if the users access level is high enough.

    Where would I enter this code?.....I don't need code written to me...just some help on where to place it inside the architect.....?

    I looked at the "before render" event ....but I don't know how to cancel the rendering of the panel ... is that a possibe approach or is there a better one?

    Thank you everyone

  2. #2
    Touch Premium Member BostonMerlin's Avatar
    Join Date
    Aug 2010
    Vote Rating


    set your panel to hidden in architect. after you retrieve your 'access level' values, find your panel by issuing a blanket search Ext.Viewport.down('#panelsItemID').setHidden(false); if you want to show it else leave it alone as it's already hidden.

    That's big picture, your approach would differ depending on when and where you actually add that panel to your app.

    Hope that helps

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts