TabView/Id - exists

Hi,

I have two questions?

  1. How to check if a tabbar exists in a tabivew?
    The idea here is I have a menu of items, when user selects an item of the menu i will show it in a tabbar, so it will be multi-tabs.
    when it’s not opened, system will create a new tab, if exists, system will activate / select the tab.

  2. how to check if a component exists in the application?
    does webix have a collection/dictionary of objects/ids to search ?

Thanks

  1. I would pull the data from view and loop them, check which tab is open and apply connected data

  2. if($$(“componentName”)){your code if exists} else {code if not exist}

Hi Arnes,

Sometimes that does not work. What i mean is to get an id from webix dictionary of all objects. It can be a parent id or sub/element id.

For the tab. How to achieve that. Any existing examples.?

Thanks

(1) There’s a sample that meets your needs. But there tabbar and multiview are used separately, and the code checks whether the view with the same ID as the corresponding tab exists.

Here’s the same sample with the tabview widget: http://webix.com/snippet/7afb749c. View ID is also checked, not tabbar option.

If needed, tabbar options can be accessed as tabbar.config.options.

(2) The method Arnes proposed is correct. And through Webix does not have a pull of all the initialized objects, you can navigate through the object tree with such methods as:

  • view.getParentView();
  • view.getChildViews();

Hi Helga,

Thank You for help, the example given is what i really want… Also thanks to Arnes for help