Interface DocumentView

    • Field Detail

      • POPUP_BEAN_ATTRIBUTE

        static final java.lang.String POPUP_BEAN_ATTRIBUTE
        Name of the session attribute for the viewer popup.
        See Also:
        Constant Field Values
      • EDIT_WINDOW_PREFIX

        static final java.lang.String EDIT_WINDOW_PREFIX
        Prefix of IDs of a popup-window in edit mode.
        See Also:
        Constant Field Values
      • NO_EXTERNAL_WINDOW

        static final java.lang.String NO_EXTERNAL_WINDOW
        Constant that defines that the viewer-implementation has no external window.
        See Also:
        Constant Field Values
    • Method Detail

      • openDocument

        void openDocument​(DocumentId documentId,
                          java.util.List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentElements,
                          int element)
        Opens the specified url and displays the document.
        Parameters:
        documentId - the document's id
        element - document element
        documentElements - the document's elements (sub documents)
      • openDocument

        void openDocument​(DocumentId documentId,
                          java.util.List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> documentElements,
                          int element,
                          boolean currentRevision)
        Opens the specified url and displays the document.
        Parameters:
        documentId - the document's id
        element - document element
        documentElements - the document's elements (sub documents)
        currentRevision - whether to resolve the current revision or not
      • openSubDocument

        void openSubDocument()
        Opens a sub document structure.
      • onLogon

        void onLogon​(org.zkoss.zk.ui.event.Event event)
        Event handler for logon event. The viewer will be enabled if the logon was successful.
        Parameters:
        event - ZK event
      • disable

        void disable()
        Disables the viewer.
      • enable

        void enable()
        Enables the viewer.
      • refreshView

        void refreshView()
        Refreshes the view with the last opened document.
      • reset

        void reset​(boolean showInitImage)
        Closes the current document.
        Parameters:
        showInitImage - true, shows an initialization image (if supported by the viewer-component in use)
      • reset

        void reset()
        Closes the current document.
      • onDisplayResultItem

        void onDisplayResultItem​(org.zkoss.zk.ui.event.Event event)
        Display document.
        Parameters:
        event - Event
      • onResetGui

        void onResetGui​(org.zkoss.zk.ui.event.Event event)
        Handler for reset ui event.
        Parameters:
        event - ZK event
      • setPropertiesFileName

        void setPropertiesFileName​(java.lang.String filename)
        Sets the name of a properties file for the internal viewer component. Optional parameter.
        Parameters:
        filename - the new properties file name
      • getPropertiesFileName

        java.lang.String getPropertiesFileName()
        Gets the properties file name.
        Returns:
        the properties file name
      • hasOpenChanges

        boolean hasOpenChanges()
        Check open changes in viewer.
        Returns:
        True, if open changes
      • getStructureList

        StructureList<?> getStructureList()
        Gets the structure list.
        Returns:
        the structure list
      • getParentForm

        IntelligentFormView getParentForm()
        Gets the parent form of this DocumentView.
        Returns:
        the parent form
      • setEnableLoadingMessage

        void setEnableLoadingMessage​(boolean enable)
        Enables or disables the loading message that will be shown when the viewer is initiated. Note that not all viewer-components support showing a loading-message.
        Parameters:
        enable - enabled or disabled
      • isEnableLoadingMessage

        boolean isEnableLoadingMessage()
        Returns:
        true if loading message is enabled
      • setViewerClass

        void setViewerClass​(java.lang.String clazz)
        Sets the class-name of the contained viewer-component.
        Parameters:
        clazz - the class-name of the viewer-component
      • getViewerClass

        java.lang.String getViewerClass()
        Gets the class-name of the contained viewer-component.
        Returns:
        the class-name of the contained viewer-component.
      • isStructureButtonsBoxShown

        boolean isStructureButtonsBoxShown()
        Tells you if the structure buttons of the structure view are shown or not. Default is true.
        Returns:
        True if structure buttons and its surrounding structure button box of structure view are shown, false else.
      • setStructureButtonsBoxShown

        void setStructureButtonsBoxShown​(boolean showStructureButtonsBox)
        Set the visibility of the its structure button box and its containingn structure buttons of the structure view.
        Parameters:
        showStructureButtonsBox - Removes the structure buttons and its surrounding structure button box if it is set to false and shows the buttons if it is set to true.
      • handleLinkElement

        void handleLinkElement​(DocumentArchiveMetaInfo.ElementArchiveMetaInfo linkElement)
        Handles the viewing of a linked element. How this is done is up to the implementation of the DocumentView component. The default-implementation opens a popup window to show the document.
        Parameters:
        linkElement - the linked element to view
      • setStructureEnabled

        void setStructureEnabled​(boolean enabled)
        Enables or disables the structure view.
        Parameters:
        enabled - enabled/disabled
      • isStructureEnabled

        boolean isStructureEnabled()
        Returns:
        true if structure view is enabled
      • canModifyDocument

        boolean canModifyDocument()
        Checks if the ViewerComponent used by this viewer can modify documents.
        Returns:
        can edit documents
      • canShowRevisions

        boolean canShowRevisions()
        Checks if the ViewerComponent used by this viewer can show the document revisions.
        Returns:
        true or false