Roo/bootstrap/TabPanel.js
authorAlan Knowles <alan@roojs.com>
Wed, 4 Feb 2015 06:57:11 +0000 (14:57 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 4 Feb 2015 06:57:11 +0000 (14:57 +0800)
Roo/bootstrap/TabPanel.js

index df86f1e..3570c33 100644 (file)
@@ -66,13 +66,17 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
         
         // registration with navgroups..
         if (this.navId && this.tabId) {
-            var item = Roo.bootstrap.NavGroup.get(this.navId).getNavItem(this.tabId);
-            if (!item) {
-                Roo.log("could not find navID:"  + this.navId + ", tabId: " + this.tabId);
-            } else {
-                item.on('changed', function(item, state) {
-                    this.setActive(state);
-                }, this);
+            var grp = Roo.bootstrap.NavGroup.get(this.navId);
+            if (grp) {
+                //code
+                var item = grp.getNavItem(this.tabId);
+                if (!item) {
+                    Roo.log("could not find navID:"  + this.navId + ", tabId: " + this.tabId);
+                } else {
+                    item.on('changed', function(item, state) {
+                        this.setActive(state);
+                    }, this);
+                }
             }
         }
         // tabgroup.