1. #1
    Ext User
    Join Date
    Jun 2007
    Posts
    51
    Vote Rating
    0
    pcrombach is on a distinguished road

      0  

    Default Contextmenu's in 3.0

    Contextmenu's in 3.0


    Another weird problem is contextmenu's in Extjs 3.0.
    I load contextmenu's dynamically from server. Sometimes there are more options in the menu than I expected. I inspected the loaded JSON in firebug for these menu's but they are allright. the number of menu entries seems to be random. One 1 entry loaded form service (as JSON) display 5 or sometimes even 8 entries show in the menu.

    In Extjs 2.2.1 everything works perfect.

  2. #2
    Ext User
    Join Date
    Jun 2007
    Posts
    51
    Vote Rating
    0
    pcrombach is on a distinguished road

      0  

    Default


    Here is the piece of code I use to populate the menu's:

    Code:
    		extEl.on('dblclick', function(e, t){
    			e.stopEvent();
    //
    // Shortcut dblclick start
    // Haal met Ajax het contextmenu op voor deze user deze module
    //
    			Ext.Ajax.request({
    				scope: this,
    				url: 'fmisondemand/Hoofdmenu/SubMenuConfig.php',
    				params: {module: module},
    				method: 'POST',
    				success: function(response, options){
    					var decoded = Ext.decode(response.responseText);
    					var menuitems = decoded.menu;
    					if(decoded.success){
    					    menu = new Ext.menu.Menu({
    					        id: 'desktopcontextMenu',
    					        items: menuitems
    						});
    						menu.showAt(e.getXY());
    					}
    				}
    			});
    		});

  3. #3
    Ext User
    Join Date
    Jun 2007
    Posts
    51
    Vote Rating
    0
    pcrombach is on a distinguished road

      0  

    Default fixed

    fixed


    I'm proud on myself. I fixed this problem. All generated menu's did have the same Id. After make them unique all is fine again. Again a nice lesson to make all Id's unique. Even in a very large application.

  4. #4
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    This would have been a problem in any version of Ext, including Ext 2.2.1.

Thread Participants: 1