Version: SmartClient Version: v11.0p_2016-09-30/LGPL Development Only (built 2016-09-30)
Browser: Chrome Version 52.0.2743.116 m
We just upgraded one of our projects to SmartGWT 6.0, and have met some problems. One of them is confusing me a bit, as it isn't clear if we're just doing something wrong, or if there is a bug in SmartGWT.
After upgrading, a lot of our Tabs stopped showing, and our console was spammed with:
Now, we do not explicitly specify any ID for the Tabs, so it seemed like the AutoID system was having some problems.
After some testing, it seems that our method of hiding and showing tabs are at fault. When we hide a tab we use:
and then just use tabSet.addTab(tab) later when we want to show it again.
However, it seems that now, when we use removeTab, it's ID is released back to the AutoID for re-use on the next created tab.
So what was causing all our tabs to disappear was the fact that we hid a tab, which caused 'isc_Tab_1' to become available. We then re-added the tab, which made it so the ID was in use again.
Then, when we added new tabs using the AutoID, got assigned the ID 'isc_Tab_1', which collided, and caused the previous tab to be destroyed. Destroying that Tab then seems to put 'isc_Tab_1' back for re-use.
This then continued over and over for each tab, essentially only leaving us the last Tab.
So my question is: Is removeTab supposed to put the Tab's ID back into the AutoID system for re-use?
If so, you might want to specify this somewhere in the Docs.
Thank you for your time =)
Browser: Chrome Version 52.0.2743.116 m
We just upgraded one of our projects to SmartGWT 6.0, and have met some problems. One of them is confusing me a bit, as it isn't clear if we're just doing something wrong, or if there is a bug in SmartGWT.
After upgrading, a lot of our Tabs stopped showing, and our console was spammed with:
Code:
isc_Tab_1 collides with the ID for an existing object '[SimpleTabButton ID:isc_Tab_1]'. The existing object will be destroyed and the ID bound to the new object.
After some testing, it seems that our method of hiding and showing tabs are at fault. When we hide a tab we use:
Code:
tabSet.updateTab(tab, null); tabSet.removeTab(tab);
However, it seems that now, when we use removeTab, it's ID is released back to the AutoID for re-use on the next created tab.
Code:
Log.message("Tab ID: " + tab.getID()); //Prints: Tab ID: isc_Tab_1 topTabs.updateTab(tab, null); topTabs.removeTab(tab); Log.message("New tab ID: " + new Tab("Test").getID()); //Prints: New tab ID: isc_Tab_1
Then, when we added new tabs using the AutoID, got assigned the ID 'isc_Tab_1', which collided, and caused the previous tab to be destroyed. Destroying that Tab then seems to put 'isc_Tab_1' back for re-use.
This then continued over and over for each tab, essentially only leaving us the last Tab.
So my question is: Is removeTab supposed to put the Tab's ID back into the AutoID system for re-use?
If so, you might want to specify this somewhere in the Docs.
Thank you for your time =)
Comment