Class CmsContainerpageHandler

    • Method Detail

      • activateSelection

        public void activateSelection()
        Activates the selection button.

      • addToFavorites

        public void addToFavorites​(CmsListItem listItem)
        Adds the given list item widget to the favorite list widget.

        Parameters:
        listItem - the list item
      • addToFavorites

        public void addToFavorites​(java.lang.String clientId)
        Adds the element with the given id to the favorite list.

        Parameters:
        clientId - the client id
      • addToRecent

        public void addToRecent​(CmsListItem listItem)
        Adds the given list item widget to the recent list widget.

        Parameters:
        listItem - the list item
      • addToRecent

        public void addToRecent​(java.lang.String clientId)
        Adds the element with the given id to the favorite list.

        Parameters:
        clientId - the client id
      • changeTemplateContextManually

        public void changeTemplateContextManually​(java.lang.String cookieName,
                                                  java.lang.String value)
        Switches the template context.

        Parameters:
        cookieName - the cookie name
        value - the new template context
      • checkNewWidgetsAvailable

        public void checkNewWidgetsAvailable​(org.opencms.util.CmsUUID structureId,
                                             com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Boolean> asyncCallback)
        Checks whether GWT widgets are available for all fields of a content.

        Parameters:
        structureId - the structure id of the content
        asyncCallback - the callback for the result
      • createSimpleContextMenuEntry

        public CmsContextMenuEntry createSimpleContextMenuEntry​(org.opencms.util.CmsUUID structureId,
                                                                java.lang.String name,
                                                                boolean checked,
                                                                java.lang.Runnable action)
        Creates a context menu entry.

        Parameters:
        structureId - structure id of the resource
        name - the label
        checked - true if checkbox should be displayed
        action - the action to execute
        Returns:
        the menu entry
      • editElementSettings

        public void editElementSettings​(CmsContainerPageElementPanel elementWidget)
        Starts the property editor for the given container element.

        Parameters:
        elementWidget - the container element widget for which the properties should be edited
      • enableFavoriteEditing

        public void enableFavoriteEditing​(boolean enable,
                                          I_CmsDNDController dndController)
        Enables the favorites editing drag and drop controller.

        Parameters:
        enable - if true favorites editing will enabled, otherwise disabled
        dndController - the favorites editing drag and drop controller
      • gotoSitemap

        public void gotoSitemap()
        Leaves the current page and opens the site-map.

      • hasActiveSelection

        public boolean hasActiveSelection()
        Returns if the selection button is active.

        Returns:
        true if the selection button is active
      • hideMenu

        public void hideMenu()
        Hides any open menu.

      • hidePageOverlay

        public void hidePageOverlay()
        Removes page overlay if present.

      • insertContextMenu

        public void insertContextMenu​(java.util.List<org.opencms.gwt.shared.CmsContextMenuEntryBean> menuBeans,
                                      org.opencms.util.CmsUUID structureId)
        Inserts the context menu.

        Parameters:
        menuBeans - the menu beans from the server
        structureId - the structure id of the resource for which the context menu entries should be generated
      • leavePage

        public void leavePage​(com.google.gwt.user.client.Command leavingCommand)
        Call to leave the page. Will open save/leave/cancel dialog if page contains any changes.

        Parameters:
        leavingCommand - the page leaving command
      • leavePage

        public void leavePage​(java.lang.String target)
        Call to leave the page. Will open save/leave/cancel dialog if page contains any changes.

        Parameters:
        target - the target
      • loadContextMenu

        public void loadContextMenu​(org.opencms.util.CmsUUID structureId,
                                    org.opencms.gwt.shared.CmsCoreData.AdeContext context)
        Loads the context menu entries for a given URI.

        Parameters:
        structureId - the structure id of the resource for which the context menu should be loaded
        context - the ade context (sitemap or containerpage)
      • loadFavorites

        public void loadFavorites()
        Loads the favorite list from the server and adds it's items to the clip-board.

      • loadRecent

        public void loadRecent()
        Loads the recent list from the server and adds it's items to the clip-board.

      • onLockFail

        public void onLockFail​(java.lang.String errorMessage)
        Should be called when locking the container page failed.

        Parameters:
        errorMessage - the locking information
      • openEditorForElement

        public void openEditorForElement​(CmsContainerPageElementPanel element,
                                         boolean inline,
                                         boolean wasNew)
        Opens the edit dialog for the specified element.

        Parameters:
        element - the element to edit
        inline - true to open the inline editor for the given element if available
        wasNew - true in case this is a newly created element not previously edited
      • openEditorForNewListContent

        public void openEditorForNewListContent​(org.opencms.gwt.shared.CmsListElementCreationOption option,
                                                java.lang.String reloadId,
                                                java.lang.String postCreateHandler)
        Triggers creation/editing of a new content after an option has been selected.
        Parameters:
        option - the type option selected by the user
        reloadId - the id of the element to be reloaded after editing
        postCreateHandler - the post-create handler (for assigning categories or similar)
      • openElementsInfo

        public void openElementsInfo()
        Opens the elements info dialog.

      • openListAddDialog

        public void openListAddDialog​(org.opencms.util.CmsUUID structureId,
                                      java.lang.String listAddMetadata)
        Opens the dialog for adding a new list content.
        Parameters:
        structureId - the structure id of the container element
        listAddMetadata - the list-add metadata read from the container element
      • openModelResourceSelect

        public void openModelResourceSelect​(CmsContainerPageElementPanel element,
                                            java.util.List<org.opencms.gwt.shared.CmsModelResourceInfo> modelResources)
        Opens the model select dialog for the given new element.

        Parameters:
        element - the element widget
        modelResources - the available resource models
      • reloadElements

        public void reloadElements​(java.lang.String[] elementIds,
                                   java.lang.Runnable callback)
        Reloads the content for the given element and all related elements.

        Parameters:
        elementIds - the element id's
        callback - the callback to execute after reloading
      • replaceElement

        public void replaceElement​(CmsContainerPageElementPanel element,
                                   java.lang.String elementId,
                                   java.lang.Runnable callback)
        Replaces the given element with another content while keeping it's settings.

        Parameters:
        element - the element to replace
        elementId - the id of the replacing content
        callback - the callback to execute after replacing the element
      • resetEditableListButtons

        public void resetEditableListButtons()
        Shows list collector direct edit buttons (old direct edit style), if present.

      • resetPage

        public void resetPage()
        Resets the container-page to it's previous state.

      • savePage

        public void savePage()
        Saves the current state of the container-page.

      • setEditButtonsVisible

        public void setEditButtonsVisible​(boolean visible)
        Sets the edit button visible.

        Parameters:
        visible - the visibility
      • showPageOverlay

        public void showPageOverlay()
        Shows a page overlay preventing user actions.

      • showPreview

        public void showPreview​(int buttonLeft)
        Toggles the tool-bars visibility.

        Parameters:
        buttonLeft - the selection button absolute left position, needed to show the leave preview button in the same location
      • updateClipboard

        public void updateClipboard​(java.util.Map<java.lang.String,​org.opencms.ade.containerpage.shared.CmsContainerElementData> elements)
        Updates the clip board elements is necessary.

        Parameters:
        elements - the elements data
      • createRawMenuEntry

        protected CmsContextMenuEntry createRawMenuEntry​(org.opencms.util.CmsUUID structureId,
                                                         java.lang.Runnable action)
        Creates a menu entry based on a structure id and action without anything else.

        Parameters:
        structureId - the structure id
        action - the action for the menu entry
        Returns:
        the new menu entry
      • createTemplateContextSelectionMenuEntry

        protected I_CmsContextMenuEntry createTemplateContextSelectionMenuEntry​(org.opencms.util.CmsUUID structureId)
        Creates the template context selection entry for the context menu.

        Parameters:
        structureId - the structure id of the page
        Returns:
        the new context menu entry
      • decorateMenuEntry

        protected void decorateMenuEntry​(CmsContextMenuEntry entry,
                                         java.lang.String name,
                                         boolean checked)
        Fills in label and checkbox of a menu entry.

        Parameters:
        entry - the menu entry
        name - the label
        checked - true if checkbox should be shown
      • getLockErrorMessage

        protected java.lang.String getLockErrorMessage​(org.opencms.gwt.shared.CmsLockInfo lockInfo)
        Helper method for getting the error message for a locking error.

        Parameters:
        lockInfo - the lock information
        Returns:
        the error message
      • getLockErrorTitle

        protected java.lang.String getLockErrorTitle​(org.opencms.gwt.shared.CmsLockInfo lockInfo)
        Helper method for getting the error message box title for a locking error.

        Parameters:
        lockInfo - the lock information
        Returns:
        the error message box title
      • openPublish

        protected void openPublish()
        Opens the publish dialog without changes check.

      • setElementView

        protected void setElementView​(org.opencms.ade.containerpage.shared.CmsElementViewInfo elementView,
                                      java.lang.Runnable nextAction)
        Sets the element view.

        Parameters:
        elementView - the element view
        nextAction - the action to execute after setting the view