Newbie Question > Render Panel only if condition is true
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
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