For the method setActiveTab(), we need to take care of two different situations: 1. the tabgroup is not opened yet; 2. the tabgroup is opened already. If the tabgroup is not opened yet, we need to keep a record of "tabOrIndex", so it will set correct active tab later in handlePostOpen(). If the tabgroup is opened already, the current method will work correctly.