Currently when I try to set A1_2 as selected (using the zscript at the end), since there is a fulfill condition on the tabpanel it is associated with, it gives an error: 'Fellow component not found: A1_1'.

1. On demand loading of all the tabs, since the contents on each of those tabs are very huge. So, if I allow all tabs to be loaded at the same time, it will degrade the performance (as it is doing now).
Solution: use the 'fulfill' attribute for the tabpanel

2. I need a way to load a specific tab when the page loads for the first time.
This will be done programmatically based on certain rules.
Solution: wnd.getFellow("A1_2").setSelected(true);

Please note that I have multi level tabs, which means that I might need to load
A1_2 when the page loads. (Level 1: Tab1 Level 2: Tab2) To achieve this, I do 'setSelected(true)' for all the tabs from the top level as well. In this case,
A1 and then A1_2
(although this does not appear in the code above:
wnd.getFellow("A1").setSelected(true); can be attahced before:
wnd.getFellow("A1_2").setSelected(true);
but the result is the same).

My problem is that both requirements 1 and 2 cannot be achieved collectively with the solutions mentioned above. So is there any way by which I can avoid loading of all the tabs at the same time and also allow dynamic loading of a 2nd level tab on page load?

1. fulfill is triggered by the specified "event". And until then the associated components are created.

2. The onCreate() that fire the "event" is triggered later after the page is completely loaded. (i.e. when getFellow("A1_2") in zscript is called when loading the page, the onCreate() is not called yet.) So wnd.getFellow("A1_2") will give you the error message since that A1_2 component has not been created yet.

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!