Class IntelligentFormPopupWindow

  • All Implemented Interfaces:
    EventChild, EventChildHandler, LogEventChildHandler, java.io.Serializable, java.lang.Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.ext.Scope, org.zkoss.zk.ui.IdSpace, org.zkoss.zk.ui.sys.ComponentCtrl, org.zkoss.zul.ext.Framable

    public class IntelligentFormPopupWindow
    extends BaseWindow
    A window that can be used to display an intelligent form as a popup. To initialize the contained form, post an onEditFolder, onNewItem, onEditItem or onIndexChange event to the window.
    Supported events for listeners:
    • onSaveFolder Sent when this popup is used to edit a folder.
    • onAddLookup Sent when this popup is used to add lookup entries.
    • onEditLookup Sent when this popup is used to edit lookup entries.
    • onFBOk Generic event fired when the user clicks ok. Contains an IFormPopupResult in it's data-field.
    • onFBCancel Generic event fired when the user clicks cancel (or cancel-and).
    • onFBCancelAnd Sent when the user clicks on a cancel-and button. When a listener is added for this event, the generic onFBCancel event will not be fired.
    • onFormRenderError Sent when rendering the form failed.
    See Also:
    Serialized Form
    • Constructor Detail

      • IntelligentFormPopupWindow

        public IntelligentFormPopupWindow()
    • Method Detail

      • handleButtonEvent

        public void handleButtonEvent​(org.zkoss.zk.ui.event.Event event)
        Handles events sent from buttons in the intelligent form.
        Parameters:
        event - event
      • onDocumentAdded

        public void onDocumentAdded​(org.zkoss.zk.ui.event.Event event)
        Event handler for the onDocumentAdded event that is sent when a new document was added.
        Parameters:
        event - the event to handle
      • onSaveDoc

        public void onSaveDoc​(org.zkoss.zk.ui.event.Event event)
        Event handler for onSaveDoc event.
        Parameters:
        event - event
      • show

        public static org.zkoss.zk.ui.Component show​(java.lang.String title,
                                                     FolderId id,
                                                     boolean highlighted,
                                                     boolean closable)
        Creates and shows the IntelligentFormPopupWindow without a predefined mask.
        Parameters:
        title - window title
        id - id of the folder being edited in this form or null, if form is not used to edit a folder
        highlighted - if true, the popup will be displayed in highlighted mode (see Window.doHighlighted())
        closable - if true, the popup window will have a close-button
        Returns:
        the window that was created
      • show

        public static org.zkoss.zk.ui.Component show​(java.lang.String title,
                                                     FolderId id,
                                                     boolean highlighted,
                                                     boolean closable,
                                                     org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> createdListener)
        Creates and shows the IntelligentFormPopupWindow without a predefined mask.
        Parameters:
        title - window title
        id - id of the folder being edited in this form or null, if form is not used to edit a folder
        highlighted - if true, the popup will be displayed in highlighted mode (see Window.doHighlighted())
        closable - if true, the popup window will have a close-button
        createdListener - event listener that will be called when the form was created. The form itself will be contained in the event's data field.
        Returns:
        the window that was created
      • getIformId

        public java.lang.String getIformId()
        Gets the iform id.
        Returns:
        the iform id
      • onPageDetached

        public void onPageDetached​(org.zkoss.zk.ui.Page page)
        Specified by:
        onPageDetached in interface org.zkoss.zk.ui.sys.ComponentCtrl
        Overrides:
        onPageDetached in class org.zkoss.zul.Window
      • onCancel

        public void onCancel​(org.zkoss.zk.ui.event.Event event)
        Event handler for Events.ON_CANCEL event.
        Parameters:
        event - event to handle