Class MainTabHelper


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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void closeQueryForm​(java.lang.String formName)
      Closes the form with the specified name.
      static void openQueryForm​(java.lang.String formName)
      Opens the form with the specified name in the main-tab-view.
      static void openQueryForm​(java.lang.String formName, org.zkoss.zk.ui.event.EventListener formCreatedListener)
      Opens the form with the specified name in the main-tab-view.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • openQueryForm

        public static void openQueryForm​(java.lang.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​(java.lang.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​(java.lang.String formName)
        Closes the form with the specified name.
        Parameters:
        formName - name of the query-form to close