[pve-devel] [PATCH manager 3/4] check if tabs exist before selecting them

Dominik Csapak d.csapak at proxmox.com
Wed Jun 1 16:59:43 CEST 2016


>> -		if (res && res[1]) {
>> +		if (res && res[1] && Ext.isArray(me.items)) {
>> +		    me.items.forEach(function(item) {
>> +			if (item.itemId === res[1]) {
>> +			    activeTab = res[1];
>> +			}
>> +		    });
>> +		} else if (res && res[1] && me.items && me.items.itemId === res[1]) {
>>   		    activeTab = res[1];
>>   		}
> Isn't there a better way (ExtJS function) to lookup items?
well at this point in time we are stil inside the initComponent of the
configpanel, so the component is not fully instantiated, thus most of
the extjs methods like

this.getComponent(id)

(which i wanted to use) do not work.
i can do more research, but i don't believe we have many options here




More information about the pve-devel mailing list