Hi,
I have an onRecordSelect method that adds or removes tabs based on different conditions. It seems easy enough to add a tab, but when I add it can I specify the tab index? And how do I remove a tab when all I know is the tab’s title?
Hi,
I have an onRecordSelect method that adds or removes tabs based on different conditions. It seems easy enough to add a tab, but when I add it can I specify the tab index? And how do I remove a tab when all I know is the tab’s title?
you can’t specify the index yet (is a feature request already)
We now have getTabName() so you can do it on the names to remove a tab.
What else do you want to know?
Ok, can you tell me what functions to use to write code that does this:
if (foo == 1)
{
removeTab('bar')
{
else if (!tabExists(!bar))
{
addTab('bar')
}
currently you can’t remove a tab by its name by calling
element.removeTab(‘name’)
so you have to search for it first:
for(var i =0; i<element.getMaxTabIndex();i++)
if(element.getTabNameAt(i) == name)
{
element.removeTabAt(i)
}
I guess removing by name is easier please add a RFE for this in our support system. We can make that in 3.0
What if I want to add a tab, but my tabs need to appear in a particular order?
As the user scrolls through records, tabs are added or removed depending on the status of the record. But when a tab is added, it’s just added to the end of the tab sequence instead of its original position. So although all the tabs show up correctly, the order is somewhat artibraty, which the users find confusing.
The only way I can think of fixing this is to remove all tabs onRecordSelect and add each one, but this seems like a tedious and system intensive solution… is there a better way?
this feature is already requested and i think in our support system
Does that mean we should expect to see it in 3.0?