Return to Snippet

Revision: 9575
at November 12, 2008 14:45 by peteinlux


Initial Code
/**	
 * 	Create new tab only if it does not exist before
 */

// Show tab way
HO.Class.CRUD.prototype.showTab = function (id,name) {

	HO.log("HO.Class.CRUD.showTab " + id + " " + name);

	var tabID = this.ComponentName + id;
	var tab = this.TabPanel.items.find(function(i){
		return i.id === tabID;
	})
	if (!tab) { 
		 showObject = 	this.getShowObject(id,tabID, name);

		this.TabPanel.add( showObject ).show();
		// x = {title: "dupa", layout: 'fit', items: [showObject]
		// ,autoScroll		: 	true
		// ,bodyStyle		: 	'position:relative'
		// 
		// }
		// 	
		// this.TabPanel.add( x ).show();


	} else {
		HO.log('tab exists');
		this.TabPanel.setActiveTab(tabID);
	}
}
//	eo function showTab
	

Initial URL


Initial Description


Initial Title
EXTJS - Create new tab only if it does not exist

Initial Tags
textmate

Initial Language
Other