code: protected void handleSwitchTab(int toTab) {
  
          switch (toTab) {
              case 0:
                  rebuildSimpleTab();
                  break;
              case 1:
                  rebuildIndividualTab();
                  break;
              case 2:
                  rebuildSharedTab();
                  break;
              default:
                  break;
          }
          if (m_disabledReason != null) {
              disableInput(m_disabledReason);
          } else {
              m_form.validateAllFields();
          }
      }
docs: Method which is called when the tab is switched.<p>
  
  @param toTab the tab to which the user is switching