1. #1
    Ext User
    Join Date
    Aug 2008
    Posts
    2
    Vote Rating
    0
    staticduo is on a distinguished road

      0  

    Default Ext 2.x to Ext3.0 Ext.menu.Menu duplicate items in diferent menus

    Ext 2.x to Ext3.0 Ext.menu.Menu duplicate items in diferent menus


    Hi,

    We are migrating our tool from Ext 2.x to Ext 3.0 and we found the next problem in Ext.menu.Menu object:

    We have an object with some variables and functions called Combo (in Combo.js) that create Buttons with an asociated Menu from a json request, it worked well in Ext2.x.

    But with Ext 3.0 we have found several problems in rendering of menu as you can see in the next screenshot:



    At first combo thats render it works well, and problems don't begin until the second menu are rendered. (It's render when you click the button).

    With this Html and this JS you can reproduce this error:

    Combo.html
    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Title</title>
    <script type="text/javascript" src="/ext/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="/ext/ext-all.js"></script>
    <link rel="stylesheet" type="text/css" href="/ext/resources/css/ext-all.css" />
    
    <script type="text/javascript" src="Combo.js"></script>
    
    </head>    
    <body>
     <p>Duplicated Items in menu</p>
     
     <p>Duplicated Items</p>
     
     <div id="TestAAction1" class="buttonMenutest"></div>
     <div id="TestAEscape" class="buttonMenutest"></div>
     
    <script type="text/javascript">
    
    function actionpress(e) {
    	alert("Combo Pressed");
    }
    
     var cs = "R2DS458";
     var cT = "R2D28412";
     var cTD = "DR2D28412";
     var dSQ = "R2D28415";
     var dAQ = "R2D28417A";
    	
    	var requestone = "[{text: 'Test 1: test tests', id: 'R2D28415', checked: true, group: 'TestAAction1', checkHandler: onItemCheck ,style:'color:#A00;' },{text: 'Test 1: test test', id: 'R2D28416', checked: false, group: 'TestAAction1', checkHandler: onItemCheck ,style:'color:#A00;' },{text: 'Test 1: Non-test test',style:'color:#A00;' , menu: { allowOtherMenus: false, enableScrolling: false, items: [ {text: 'Test 1: Non-test test &gt; action3', id: 'R2D28417A', checked: false, group: 'TestAAction1', checkHandler: onItemCheck ,style:'color:#A00;' },{text: 'Test 1: Non-test test &gt; Action2', id: 'R2D28417E', checked: false, group: 'TestAAction1', checkHandler: onItemCheck ,style:'color:#A00;' },{text: 'Test 1: Non-test test &gt; test', id: 'R2D28417T', checked: false, group: 'TestAAction1', checkHandler: onItemCheck ,style:'color:#A00;' }]}},{text: 'Test 1: Test test', id: 'R2D28418', checked: false, group: 'TestAAction1', checkHandler: onItemCheck ,style:'color:#A00;' },'<b class=\"menu-title\">&nbsp; Other test &amp; test</b>',{text: 'Test 2: test',menu: { 	allowOtherMenus: false, enableScrolling: false, items: [ {text: 'Test 2: Pre-Test test', id: 'R2D28493', checked: false, group: 'TestAAction1', checkHandler: onItemCheck ,style:'color:#A00;' },{text: 'Test 2: Test desc', id: 'DR2D28492', checked: false, group: 'TestAAction1', checkHandler: onItemCheck },{text: 'Test 2: test tests', id: 'R2D28495', checked: false, group: 'TestAAction1', checkHandler: onItemCheck ,style:'color:#A00;' },{text: 'Test 2: test test', id: 'R2D28496', checked: false, group: 'TestAAction1', checkHandler: onItemCheck ,style:'color:#A00;' },{text: 'Test 2: Non-test test',style:'color:#A00;' , menu: { allowOtherMenus: false, enableScrolling: false, items: [ {text: 'Test 2: Non-test test &gt; action3', id: 'R2D28497A', checked: false, group: 'TestAAction1', checkHandler: onItemCheck ,style:'color:#A00;' },{text: 'Test 2: Non-test test &gt; Action2', id: 'R2D28497E', checked: false, group: 'TestAAction1', checkHandler: onItemCheck ,style:'color:#A00;' },{text: 'Test 2: Non-test test &gt; test', id: 'R2D28497T', checked: false, group: 'TestAAction1', checkHandler: onItemCheck ,style:'color:#A00;' }]}},{text: 'Test 2: Test test', id: 'R2D28498', checked: false, group: 'TestAAction1', checkHandler: onItemCheck ,style:'color:#A00;' }]}},{text: 'Final test', id: 'R2DS458F', checked: false, group: 'TestAAction1', checkHandler: onItemCheck ,style:'color:#A00;' },{text: 'Test4', id: 'R2DS458O', checked: false, group: 'TestAAction1', checkHandler: onItemCheck },{text: 'Test 5', id: 'R2DS458', checked: false, group: 'TestAAction1', checkHandler: onItemCheck }]";
    
    var requesttwo = "[{text: 'Test 1: test tests', id: 'R2D28415', checked: false, group: 'TestAEscape', checkHandler: onItemCheck ,style:'color:#A00;' },{text: 'Test 1: test test', id: 'R2D28416', checked: false, group: 'TestAEscape', checkHandler: onItemCheck ,style:'color:#A00;' },{text: 'Test 1: Non-test test',style:'color:#A00;' , menu: { allowOtherMenus: false, enableScrolling: false, items: [ {text: 'Test 1: Non-test test &gt; action3', id: 'R2D28417A', checked: true, group: 'TestAEscape', checkHandler: onItemCheck ,style:'color:#A00;' },{text: 'Test 1: Non-test test &gt; Action2', id: 'R2D28417E', checked: false, group: 'TestAEscape', checkHandler: onItemCheck ,style:'color:#A00;' },{text: 'Test 1: Non-test test &gt; test', id: 'R2D28417T', checked: false, group: 'TestAEscape', checkHandler: onItemCheck ,style:'color:#A00;' }]}},{text: 'Test 1: Test test', id: 'R2D28418', checked: false, group: 'TestAEscape', checkHandler: onItemCheck ,style:'color:#A00;' },'<b class=\"menu-title\">&nbsp; Other test &amp; test</b>',{text: 'Test 2: test',menu: { 	allowOtherMenus: false, enableScrolling: false, items: [ {text: 'Test 2: Pre-Test test', id: 'R2D28493', checked: false, group: 'TestAEscape', checkHandler: onItemCheck ,style:'color:#A00;' },{text: 'Test 2: Test desc', id: 'DR2D28492', checked: false, group: 'TestAEscape', checkHandler: onItemCheck },{text: 'Test 2: test tests', id: 'R2D28495', checked: false, group: 'TestAEscape', checkHandler: onItemCheck ,style:'color:#A00;' },{text: 'Test 2: test test', id: 'R2D28496', checked: false, group: 'TestAEscape', checkHandler: onItemCheck ,style:'color:#A00;' },{text: 'Test 2: Non-test test',style:'color:#A00;' , menu: { allowOtherMenus: false, enableScrolling: false, items: [ {text: 'Test 2: Non-test test &gt; action3', id: 'R2D28497A', checked: false, group: 'TestAEscape', checkHandler: onItemCheck ,style:'color:#A00;' },{text: 'Test 2: Non-test test &gt; Action2', id: 'R2D28497E', checked: false, group: 'TestAEscape', checkHandler: onItemCheck ,style:'color:#A00;' },{text: 'Test 2: Non-test test &gt; test', id: 'R2D28497T', checked: false, group: 'TestAEscape', checkHandler: onItemCheck ,style:'color:#A00;' }]}},{text: 'Test 2: Test test', id: 'R2D28498', checked: false, group: 'TestAEscape', checkHandler: onItemCheck ,style:'color:#A00;' }]}},{text: 'Final test', id: 'R2DS458F', checked: false, group: 'TestAEscape', checkHandler: onItemCheck ,style:'color:#A00;' },{text: 'Test4', id: 'R2DS458O', checked: false, group: 'TestAEscape', checkHandler: onItemCheck },{text: 'Test 5', id: 'R2DS458', checked: false, group: 'TestAEscape', checkHandler: onItemCheck }]";
    	
    
    
    	Combo.add({
    		direct: requestone,
    		id: 'TestAAction1',
    		url: 'json_Test_test.asp',
    		params: { name: 'TestAAction1',  cs: cs, ct: cT, dq: dSQ, c: cTD },
    		onchange: function(e){ actionpress(); }
    	});
    
    	Combo.add({
    		direct: requesttwo,
    		id: 'TestAEscape',
    		url: 'json_combo.asp',
    		params: { name:'TestAEscape', cs: cs, ct: cT, dq: dAQ, c: cTD },
    		onchange: function(e){ actionpress(); }
    	});
    </script>
    </body>
    </html>
    And this is the JS: Combo.js
    Code:
    function onItemCheck(e, checked) {
    	alert(e.id);
    }
    
    function findSelected(o,obj,changeclass) {
    	var checkedFound = false;	
    	var i = 0;
    	while ( i < o.length && !checkedFound) {
    		if (o[i]) {
    			if (o[i].menu != null) { 
    				checkedFound = findSelected(o[i].menu.items, obj,changeclass);		
    
    				if ( (checkedFound) && (changeclass) ) {
    					o[i].ctCls = 'x-menu-item-background-selected'
    				}
    
    			} else { 
    				if (o[i].checked == true) {
    					checkedFound = true;				
    					
    					if (Combo.formfield2[obj.id] != null) { 
    
    
    						Combo.formfield2[obj.id].value = o[i].cTask;
    
    						Combo.buttons[obj.id].setText(o[i].textToShow); 
    
    						
    						if (!Combo.buttons[obj.id].disabled) {
    
    
    						} else {
    							document.getElementById(obj.id + '_qtip').className = "contextualInfoDisabled";
    						}
    						Combo.tips[obj.id] = o[i].text;
    
    					} else Combo.buttons[obj.id].setText(o[i].text ); 
    
    					if (changeclass) {
    						o[i].cls = 'x-menu-item-background-selected'
    					}
    
    					Combo.formfield[obj.id].value = o[i].id;
    				}
    			}
    		}
    		i++;
    	}
    	return (checkedFound);
    }
    
    function setSelected(o,obj,idselected) {
    	var checkedFound = false;
    	
    	for (var i=0; i < o.length; i++) {
    		if (o[i]) {
    			if (o[i].menu != null) { 
    				checkedFound = setSelected(o[i].menu.items, obj,idselected);		
    			} else { 
    				if (o[i].id == idselected) {
    					checkedFound = true;
    					o[i].checked = true;
    				}
    			}
    		}
    	}
    	return (checkedFound);
    }
    
    
    var Combo = {
    	menus:'',
    	buttons:'',
    	handlers:'',
    	events:'',
    	ids: '',
    	formfield:'',
    	formfield2:'',
    	JSONresponse:'',
    	JSONready:'',
    	loadedFirstTime:'',
    	callbacks:'',
    	ct: '',
    	dq: '',
    	qtipdiv: '',
    	urlcache: {
    		lobj:'',		
    		lresponse:'',
    		length: 0,
    		reset: function() {
    			Combo.urlcache.length = 0;
    			Combo.urlcache.lobj = new Array();
    			Combo.urlcache.lresponse = new Array();
    		},
    		add: function(obj,response) {
    			Combo.urlcache.lobj[Combo.urlcache.length] = obj;
    			Combo.urlcache.lresponse[Combo.urlcache.length] = response;
    			Combo.urlcache.length = Combo.urlcache.length + 1;
    		}
    	},
    	init: function(){
    			Combo.menus 		= new Array();
    			Combo.buttons 	= new Array();
    			Combo.handlers 	= new Array();
    			Combo.events 		= new Array();
    			Combo.ids 		= new Array();
    			Combo.formfield 	= new Array();
    			Combo.formfield2 	= new Array();
    			Combo.ct 			= new Array();
    			Combo.dq			= new Array();
    			Combo.qtipdiv		= new Array();
    			Combo.callbacks	= new Array();
    			Combo.tips		= new Array();
    			Combo.JSONready	= 0;
    			Combo.loadedFirstTime = 0;
    			Combo.urlcache.reset();
    	},
    	ApplyClassBackground: function(item, action) {
    		if (item) {			
    			if (item.parentMenu) {
    				if (item.parentMenu.parentMenu) {
    					for (var i = 0; i< item.parentMenu.parentMenu.items.length ; i++) {
    						if (item.parentMenu.parentMenu.items.items[i].menu) {
    							if (item.parentMenu.parentMenu.items.items[i].menu.id == item.parentMenu.id) {
    								if (action) {
    
    										item.parentMenu.parentMenu.items.items[i].container.addClass('x-menu-item-background-selected');															 
    
    								} else {
    
    									item.parentMenu.parentMenu.items.items[i].container.removeClass('x-menu-item-background-selected');	
    
    								}
    
    								Combo.ApplyClassBackground(item.parentMenu.parentMenu.items.items[i],action);
    
    							}
    						}
    					}
    				}
    			}
    		}
    	},
    	ApplyClassToCombo: function(menu) {
    		if (menu) {
    			for (var i=0; i < menu.items.length; i++) {				
    				if(menu.items.items[i].checked) {
    					
    					menu.items.items[i].setChecked(true,false);
    					menu.items.items[i].addClass('x-menu-item-background-selected');
    					Combo.ApplyClassBackground(menu.items.items[i],true);
    				} else {
    					Combo.ApplyClassToCombo(menu.items.items[i].menu)
    				}
    			}
    		}
    	},
    	ResetClassInitialConfig: function(initialConfig) {
    		if (initialConfig) {
    			if(initialConfig.ctCls == 'x-menu-item-background-selected') {
    					initialConfig.ctCls = ""; 
    				}
    			if(initialConfig.cls == 'x-menu-item-background-selected') {
    					initialConfig.cls = ""; 
    					initialConfig.checked = false; 												
    				}						
    			if(initialConfig.menu) {
    				for (var i=0; i < initialConfig.menu.items.length; i++) {
    					Combo.ResetClassInitialConfig(initialConfig.menu.items[i]);
    				}
    			}
    		}
    	},
    	ResetClassSelected: function(menu) {
    		if (menu) {
    			if (menu.items) {
    				for (var i=0; i < menu.items.length; i++) {			
    					menu.items.items[i].removeClass('x-menu-item-background-selected');
    					if (menu.items.items[i].initialConfig) { 
    						Combo.ResetClassInitialConfig(menu.items.items[i].initialConfig);						
    						}
    					if (menu.items.items[i].container) { menu.items.items[i].container.removeClass('x-menu-item-background-selected'); }
    					if (menu.items.items[i].menu) Combo.ResetClassSelected(menu.items.items[i].menu,true);			
    					if (menu.items.items[i].cls) menu.items.items[i].cls = "";
    					if (menu.items.items[i].ctCls) menu.items.items[i].ctCls = "";										
    				}
    			}
    		}
    	},
    	addTest: function(obj){
    			Combo.load(obj);			
    			
    			Combo.formfield2[obj.id] = document.createElement('input');
    			Combo.formfield2[obj.id].type = "hidden";
    			Combo.formfield2[obj.id].name = obj.params.name.replace(/Cue/g,"Test");
    			Combo.formfield2[obj.id].id = obj.id + "2_hidden";
    			Combo.formfield2[obj.id].value = (obj.params.dq == "" ? "" : obj.params.ct); 
    			eval("document.getElementById('"+obj.id+"').appendChild(Combo.formfield2['"+obj.id+"']);"); 
    			
    			Combo.newadd(obj);
    			
    	},	
    	add: function(obj){	
    			Combo.formfield[obj.id] = document.createElement('input');
    			Combo.formfield[obj.id].type = "hidden";
    			Combo.formfield[obj.id].name = (obj.params.hiddenName ? obj.params.hiddenName : obj.params.name );
    			Combo.formfield[obj.id].id = obj.id + "_hidden";
    			Combo.formfield[obj.id].value = obj.params.dq; 
    			eval("document.getElementById('"+obj.id+"').appendChild(Combo.formfield['"+obj.id+"']);");
    			
    			Combo.events[obj.id] = { 
    										onchange: obj.onchange
    									};
    			Combo.menus[obj.id] = new Ext.menu.Menu({ 
    													  id: name + '_Combo',
    													  allowOtherMenus: false,
    													  enableScrolling: false													  
    													  });
    		
    			Combo.buttons[obj.id] = new Ext.Button ({ 
    												text:'Loading...', 
    												style: {display:"inline"}, 
    												cls: 'x-btn-and-menu',
    												menu: Combo.menus[obj.id] 
    											});
    
    			Combo.buttons[obj.id].render(obj.id);
    
    			if (Combo.formfield2[obj.id] != null) {
    				Combo.qtipdiv[obj.id] = document.createElement('span');
    				Combo.qtipdiv[obj.id].id = obj.params.name + '_qtip';
    				Combo.qtipdiv[obj.id].className = 'contextualInfo';
    				Combo.qtipdiv[obj.id].style.verticalAlign = 'super';
    				Combo.qtipdiv[obj.id].appendChild(document.createTextNode(' '));
    
    				eval("document.getElementById('"+obj.id+"').appendChild(document.createTextNode(' '));");
    				eval("document.getElementById('"+obj.id+"').appendChild(Combo.qtipdiv['"+obj.id+"']);");
    
    
    			}
    			
    			Combo.handlers[obj.id] = function(item,checked) { 
    					if(checked) {
    						Combo.buttons[obj.id].setText(item.text); 
    						
    						if (Combo.events[obj.id].onchange != null) {	
    							Combo.events[obj.id].onchange( { id: item.id, value: item.text } );
    						}
    						
    						Combo.formfield[obj.id].value = item.id; 
    
    						if (Combo.formfield2[obj.id] != null) {
    							Combo.formfield2[obj.id].value = item.cTask;
    							Combo.buttons[obj.id].setText(item.textToShow); 
    							
    							
    
    							Combo.tips[obj.id] = item.text;
    							
    
    						} else {
    							Combo.buttons[obj.id].setText(item.text);
    						}
    						
    						
    						Combo.ResetClassSelected(Combo.menus[obj.id]);
    						item.addClass('x-menu-item-background-selected');
    						Combo.ApplyClassBackground(item,true);
    						
    						
    					} else {
    						
    						
    					}
    			};
    			 
    			 var dosuccess = function(response) {
    					var checkedFound = false;
    					
    					Combo.menus[obj.id].removeAll();
    					var rT = response.responseText.replace(/onItemCheck/g,"Combo.handlers['" + obj.id + "']");
    					var o = eval(rT);
    
    
    					findSelected(o,obj,true);
    
    
    					
    					Combo.menus[obj.id].add(o);
    					
    				};
    			 if(obj.direct) {
    				 dosuccess({responseText: obj.direct});
    			 }
    			 else {
    				 var ajxreq = Ext.Ajax.request({
    					url: obj.url,
    					params: obj.params,
    					success: dosuccess
    				}); 
    			 }
    			
    			
    	},
    	
    	setDisabled: function (id,state) {
    		Combo.buttons[id].setDisabled(state);
    		
    		
    		if (Combo.formfield2[id] != null) {
    			if (state) {
    
    				document.getElementById(id + '_qtip').className = "contextualInfoDisabled";
    			} else {
    				
    				document.getElementById(id + '_qtip').className = "contextualInfo";
    			}
    		}
    			
    
    	},
    	resetValues: function (obj){
    		Combo.formfield[obj.id].value = "NEXT";
    		Combo.formfield2[obj.id].value = "NEXT";
    		Combo.buttons[obj.id].setText("Next test");
    		Combo.ResetClassSelected(Combo.menus[obj.id]);
    	},
    	load: function(obj){
    		var xelegida = -1;
    		for(var x = 0; x < Combo.urlcache.length; x++) {
    			if(Combo.urlcache.lobj[x].url == obj.url && Combo.urlcache.lobj[x].params.cs == obj.params.cs  ) { 
    				xelegida = x;
    			}
    		}
    		if ( xelegida < 0 ) {
    			Combo.urlcache.add(obj,null);
    			obj.urlcache = Combo.urlcache.length-1;
    			var ajxreq = Ext.Ajax.request({
    				url: obj.url,
    				params: obj.params,
    				success: function(response) {
    					var rT = response.responseText;					
    					Combo.urlcache.lresponse[obj.urlcache] = rT;					
    
    					var tempel = '';
    					var tempcallbacks = new Array();
    					while (Combo.callbacks.length > 0) {
    						tempel = Combo.callbacks.shift();
    						if(tempel.urlcache == obj.urlcache) {
    							Combo.processJSON(tempel);
    						}
    						else {
    							tempcallbacks.push(tempel);
    						}
    					}
       				   Combo.callbacks = tempcallbacks;						
    				}
    			});				
    		}
    		else {
    			obj.urlcache = xelegida;
    		}
    	},
    	newadd: function(obj){	
    			Combo.formfield[obj.id] = document.createElement('input');
    			Combo.formfield[obj.id].type = "hidden";
    			Combo.formfield[obj.id].name = obj.params.name;
    			Combo.formfield[obj.id].id = obj.id + "_hidden";
    			Combo.formfield[obj.id].value = obj.params.dq; 
    			eval("document.getElementById('"+obj.id+"').appendChild(Combo.formfield['"+obj.id+"']);");
    			
    			Combo.events[obj.id] = { 
    										onchange: obj.onchange
    									};
    			Combo.menus[obj.id] = new Ext.menu.Menu({ 
    													  id: name + '_Combo',
    													  allowOtherMenus: false,
    													  enableScrolling: false
    													  });
    		
    			
    			Combo.buttons[obj.id] = new Ext.Button ({ 
    												text: (obj.defaultButtonText ? obj.defaultButtonText : 'Loading...'), 
    												style: {display:"inline"}, 
    												cls: 'x-btn-and-menu',
    												menu: Combo.menus[obj.id] 
    											});
    
    			Combo.buttons[obj.id].render(obj.id);
    
    			if (Combo.formfield2[obj.id] != null) {
    				Combo.qtipdiv[obj.id] = document.createElement('span');
    				Combo.qtipdiv[obj.id].id = obj.params.name + '_qtip';
    				Combo.qtipdiv[obj.id].className = 'contextualInfo';
    				Combo.qtipdiv[obj.id].style.verticalAlign = 'super';
    				Combo.qtipdiv[obj.id].appendChild(document.createTextNode(' '));
    
    				eval("document.getElementById('"+obj.id+"').appendChild(document.createTextNode(' '));");
    				eval("document.getElementById('"+obj.id+"').appendChild(Combo.qtipdiv['"+obj.id+"']);");
    
    
    
    			}
    
    			
    			Combo.handlers[obj.id] = function(item,checked) { 
    												if(checked) {
    													Combo.buttons[obj.id].setText(item.text); 
    													
    													if (Combo.events[obj.id].onchange != null) {	
    														Combo.events[obj.id].onchange( { id: item.id, value: item.text } );
    													}
    													
    													Combo.formfield[obj.id].value = item.id; 
    
    													if (Combo.formfield2[obj.id] != null) {
    														Combo.formfield2[obj.id].value = item.cTask;
    														Combo.buttons[obj.id].setText(item.textToShow); 
    														
    
    
    														Combo.tips[obj.id] = item.text;
    														Combo.ResetClassSelected(Combo.menus[obj.id]);
    														item.addClass('x-menu-item-background-selected');
    														Combo.ApplyClassBackground(item,true);
    
    													} else {
    														Combo.buttons[obj.id].setText(item.text);
    													}
    												} else {
    													
    												}
    										};
    										
    			if (Combo.urlcache.lresponse[obj.urlcache] != null) {
    				Combo.processJSON(obj);
    			} else {
    				Combo.callbacks.push(obj);
    			}
    	},
    	processJSON: function(obj) {
    		var checkedFound = false;
    		
    		Combo.menus[obj.id].removeAll();
    
    		var myJSONresponse;
    		myJSONresponse = Combo.urlcache.lresponse[obj.urlcache].replace(/onItemCheck/g,"Combo.handlers['" + obj.id + "']");
    		myJSONresponse = myJSONresponse.replace(/groupname/g,obj.params.name);
    		var o = eval(myJSONresponse);
    
    		setSelected(o,obj,(obj.params.dq == '' ? 'NEXT' : obj.params.dq ));
    		findSelected(o,obj,true);
    
    		Combo.menus[obj.id].add(o);
    	
    	}
    
    };
    
    Combo.init();
    Thank in advance.

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    97
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    From the Upgrading to Ext 3 thread:
    Breaking change: MenuItem ids are no longer local to their menu but global component ids. This means that you can't use the same id in multiple menus. Suggested fix: Use unique ids or switch to using itemIds.

  3. #3
    Ext User
    Join Date
    Aug 2008
    Posts
    2
    Vote Rating
    0
    staticduo is on a distinguished road

      0  

    Default


    Thank you.

    Using itemId I can solve my problem.

  4. #4
    Sencha User
    Join Date
    Oct 2011
    Posts
    13
    Vote Rating
    0
    minchen is on a distinguished road

      0  

    Default


    Using itemId only fixed my duplicate menu item problems in my first-level menus, for second-level menus, I am still experiencing the issues. I cannot use the approach of distinct ids since some menu items are shared to issue the same command.

Thread Participants: 2