Package com.saperion.ngc.scripthelper
Class MainTabHelper
java.lang.Object
com.saperion.ngc.scripthelper.MainTabHelper
A utility-class that provides helper-methods to work with the
MainTabView
.-
Method Summary
Modifier and TypeMethodDescriptionstatic void
closeQueryForm
(String formName) Closes the form with the specified name.static void
openQueryForm
(String formName) Opens the form with the specified name in the main-tab-view.static void
openQueryForm
(String formName, org.zkoss.zk.ui.event.EventListener formCreatedListener) Opens the form with the specified name in the main-tab-view.
-
Method Details
-
openQueryForm
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 openformCreatedListener
- listener to call when the form was created
-
closeQueryForm
Closes the form with the specified name.- Parameters:
formName
- name of the query-form to close
-