Results 1 to 2 of 2

Thread: How to display panel on click event of menu?

  1. #1

    Default How to display panel on click event of menu?


    I would like to know how to display certain panel on click event of menu? I have added menu items in viewport and listening for 'click' event of menu items in controller. Upto this point its working fine but when I use Ext.widget() method to get panel and call show() method of that panel, nothing is happening.

    My code to handle menu item click event is as follows :

    viewPortMenu_ClickHandler : function(menu, item, event, options) {
            var panelToShow = null;
        if (item.text == '4D view') {
             panelToShow = Ext.widget('employeeDistribution');
         if (panelToShow != null) {
    Please let me know why this is not working / what is the preferred way to display panels at runtime?

  2. #2


    I found the answer. I just had to add the newly created panel inside viewport using add() method of viewport.

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