Class MainTabHelper

java.lang.Object
com.saperion.ngc.scripthelper.MainTabHelper

public final class MainTabHelper extends Object
A utility-class that provides helper-methods to work with the MainTabView.
  • Method Details

    • openQueryForm

      public static void openQueryForm(String formName)
      Opens the form with the specified name in the main-tab-view. If the form was not opened before, a new tab is created. Otherwise the existing tab is opened. The title-property of the form will be used as label for the new tab.
      Parameters:
      formName - the name of the form to open
    • openQueryForm

      public static void openQueryForm(String formName, org.zkoss.zk.ui.event.EventListener formCreatedListener)
      Opens the form with the specified name in the main-tab-view. If the form was not opened before, a new tab is created. Otherwise the existing tab is opened. The formCreatedListener can be used to perform any kind of action after the form was created. Note that the listener won't be called when the form was already opened. The title-property of the form will be used as label for the new tab.

      Example:
       formCreatedListener = new EventListener() {
          public void onEvent(Event event) throws Exception {
             IntelligentFormView form = (IntelligentFormView) event.getData();
             TextField field = (TextField) form.getFieldByFrameId(1);
             field.setValue("some text");
          }
       };
       
      Parameters:
      formName - the name of the form to open
      formCreatedListener - listener to call when the form was created
    • closeQueryForm

      public static void closeQueryForm(String formName)
      Closes the form with the specified name.
      Parameters:
      formName - name of the query-form to close