Class CmsContainerpageController


  • public final class CmsContainerpageController
    extends java.lang.Object
    Data provider for the container-page editor. All data concerning the container-page is requested and maintained by this provider.

    Since:
    8.0.0
    • Field Detail

      • m_elements

        protected java.util.Map<java.lang.String,​org.opencms.ade.containerpage.shared.CmsContainerElementData> m_elements
        The container element data. All requested elements will be cached here.
      • m_newElements

        protected java.util.Map<java.lang.String,​org.opencms.ade.containerpage.shared.CmsContainerElementData> m_newElements
        The new element data by resource type name.
    • Method Detail

      • getCurrentUri

        public static java.lang.String getCurrentUri()
        Returns the current URI.

        Returns:
        the current URI
      • getServerId

        public static java.lang.String getServerId​(java.lang.String clientId)
        Returns the server id for a given client element id.

        Parameters:
        clientId - the client id including an optional element settings hash
        Returns:
        the server id
      • isConfirmRemove

        public static boolean isConfirmRemove()
        Checks whether element removal should be confirmed.

        Returns:
        true if element removal should be confirmed
      • addToFavoriteList

        public void addToFavoriteList​(java.lang.String clientId)
        Adds an element specified by it's id to the favorite list.

        Parameters:
        clientId - the element id
      • addToRecentList

        public void addToRecentList​(java.lang.String clientId,
                                    java.lang.Runnable nextAction)
        Adds an element specified by it's id to the recent list.

        Parameters:
        clientId - the element id
        nextAction - the action to execute after the element has been added
      • checkNewWidgetsAvailable

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

        Parameters:
        structureId - the structure id of the content
        resultCallback - the callback for the result
      • cleanUpContainers

        public void cleanUpContainers()
        Checks for container elements that are no longer present within the DOM.

      • copyElement

        public void copyElement​(java.lang.String id,
                                I_CmsSimpleCallback<org.opencms.util.CmsUUID> callback)
        Copies an element and asynchronously returns the structure id of the copy.

        Parameters:
        id - the element id
        callback - the callback for the result
      • createAndEditNewElement

        public void createAndEditNewElement​(CmsContainerPageElementPanel element,
                                            boolean inline)
        Creates a new resource for crag container elements with the status new and opens the content editor.

        Parameters:
        element - the container element
        inline - true to open the inline editor for the given element if available
      • createAndEditNewElement

        public void createAndEditNewElement​(CmsContainerPageElementPanel element,
                                            org.opencms.util.CmsUUID modelResourceStructureId)
        Creates a new resource for drag container elements with the status new and opens the content editor.

        Parameters:
        element - the container element
        modelResourceStructureId - the model resource structure id
      • createNewElement

        public void createNewElement​(CmsContainerPageElementPanel element,
                                     com.google.gwt.user.client.rpc.AsyncCallback<org.opencms.ade.containerpage.shared.CmsContainerElement> callback)
        Creates a new element.

        Parameters:
        element - the widget belonging to the element which is currently in memory only
        callback - the callback to call with the result
      • deleteElement

        public void deleteElement​(java.lang.String elementId,
                                  java.lang.String relatedElementId)
        Deletes an element from the VFS, removes it from all containers and the client side cache.

        Parameters:
        elementId - the element to delete
        relatedElementId - related element to reload after the element has been deleted
      • 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
      • executeCopyModelReplace

        public void executeCopyModelReplace​(java.lang.String originalElementId,
                                            com.google.gwt.dom.client.Element modelGroupParent,
                                            org.opencms.ade.containerpage.shared.CmsContainerElementData elementData)
        Replaces all element instances of the original element with the new element within the former copy model.

        Parameters:
        originalElementId - the original element id
        modelGroupParent - the model group parent element
        elementData - the replace element data
      • getCachedElement

        public org.opencms.ade.containerpage.shared.CmsContainerElementData getCachedElement​(java.lang.String clientId)
        Returns the data for the requested element, or null if the element has not been cached yet.

        Parameters:
        clientId - the element id
        Returns:
        the element data
      • getCachedNewElement

        public org.opencms.ade.containerpage.shared.CmsContainerElementData getCachedNewElement​(java.lang.String resourceTypeName)
        Returns the data for the requested element, or null if the element has not been cached yet.

        Parameters:
        resourceTypeName - the element resource type
        Returns:
        the element data
      • getContainer

        public org.opencms.ade.containerpage.shared.CmsContainer getContainer​(java.lang.String containerName)
        Returns the container data of container with the given name.
        Parameters:
        containerName - the container name
        Returns:
        the container data
      • getContainerElementWidgetForElement

        public com.google.common.base.Optional<CmsContainerPageElementPanelgetContainerElementWidgetForElement​(com.google.gwt.dom.client.Element element)
        Gets the container element widget to which the given element belongs, or Optional.absent if none could be found.

        Parameters:
        element - the element for which the container element widget should be found
        Returns:
        the container element widget, or Optional.absent if none can be found
      • getContainerInfoForGalleries

        public org.opencms.gwt.shared.CmsGalleryContainerInfo getContainerInfoForGalleries()
        Gets the container info to send to the gallery service.
        Returns:
        the container info to send to the gallery service
      • getContainerpageService

        public org.opencms.ade.containerpage.shared.rpc.I_CmsContainerpageServiceAsync getContainerpageService()
        Returns the container-page RPC service.

        Returns:
        the container-page service
      • getContainers

        public java.util.Map<java.lang.String,​org.opencms.ade.containerpage.shared.CmsContainer> getContainers()
        Returns the containers.

        Returns:
        the containers
      • getContainerTarget

        public CmsContainerPageContainer getContainerTarget​(java.lang.String containerName)
        Returns the container drag target by name (HTML id attribute).

        Parameters:
        containerName - the container name
        Returns:
        the drag target
      • getContainerType

        public java.lang.String getContainerType​(java.lang.String containerName)
        Returns the type of container with the given name.

        Parameters:
        containerName - the container name
        Returns:
        the container type
      • getData

        public org.opencms.ade.containerpage.shared.CmsCntPageData getData()
        Returns the prefetched data.

        Returns:
        the prefetched data
      • getDeleteOptions

        public void getDeleteOptions​(java.lang.String clientId,
                                     I_CmsSimpleCallback<org.opencms.ade.containerpage.shared.CmsDialogOptionsAndInfo> callback)
        Returns the delete options for the given content element.

        Parameters:
        clientId - the content id
        callback - the callback to execute
      • getEditOptions

        public void getEditOptions​(java.lang.String clientId,
                                   boolean isListElement,
                                   I_CmsSimpleCallback<org.opencms.ade.containerpage.shared.CmsDialogOptionsAndInfo> callback)
        Returns the edit options for the given content element.

        Parameters:
        clientId - the content id
        isListElement - in case a list element, not a container element is about to be edited
        callback - the callback to execute
      • getElementForDragAndDropFromContainer

        public void getElementForDragAndDropFromContainer​(java.lang.String clientId,
                                                          java.lang.String containerId,
                                                          boolean alwaysCopy,
                                                          I_CmsSimpleCallback<org.opencms.ade.containerpage.shared.CmsContainerElementData> callback)
        Requests the data for a container element specified by the client id for drag and drop from a container. The data will be provided to the given call-back function.

        Parameters:
        clientId - the element id
        containerId - the id of the container from which the element is being dragged
        alwaysCopy - true in case reading data for a clipboard element used as a copy group
        callback - the call-back to execute with the requested data
      • getElements

        public void getElements​(java.util.Set<java.lang.String> clientIds,
                                I_CmsSimpleCallback<java.util.Map<java.lang.String,​org.opencms.ade.containerpage.shared.CmsContainerElementData>> callback)
        Requests the data for container elements specified by the client id. The data will be provided to the given call-back function.

        Parameters:
        clientIds - the element id's
        callback - the call-back to execute with the requested data
      • getElementSettingsConfig

        public void getElementSettingsConfig​(java.lang.String clientId,
                                             java.lang.String containerId,
                                             I_CmsSimpleCallback<org.opencms.ade.containerpage.shared.CmsElementSettingsConfig> callback)
        Requests the element settings config data for a container element specified by the client id. The data will be provided to the given call-back function.

        Parameters:
        clientId - the element id
        containerId - the parent container id
        callback - the call-back to execute with the requested data
      • getElementView

        public org.opencms.ade.containerpage.shared.CmsElementViewInfo getElementView()
        Returns the current element view.

        Returns:
        the current element view
      • getElementWithSettings

        public void getElementWithSettings​(java.lang.String clientId,
                                           java.util.Map<java.lang.String,​java.lang.String> settings,
                                           I_CmsSimpleCallback<org.opencms.ade.containerpage.shared.CmsContainerElementData> callback)
        Retrieves a container element with a given set of settings.

        Parameters:
        clientId - the id of the container element
        settings - the set of settings
        callback - the callback which should be executed when the element has been loaded
      • getGroupcontainerId

        public java.lang.String getGroupcontainerId()
        Returns the id of the currently edited group-container.

        Returns:
        the group-container id, or null if no editing is taking place
      • getLoadTime

        public long getLoadTime()
        Returns the time off page load.

        Returns:
        the time stamp
      • getLockErrorMessage

        public java.lang.String getLockErrorMessage()
        Gets the lock error message.

        Returns:
        the lock error message
      • getModelGroupElementId

        public java.lang.String getModelGroupElementId()
        Returns the model group base element id.

        Returns:
        the model group base element id
      • getNewElement

        public void getNewElement​(java.lang.String resourceType,
                                  I_CmsSimpleCallback<org.opencms.ade.containerpage.shared.CmsContainerElementData> callback)
        Returns the element data for a resource type representing a new element.

        Parameters:
        resourceType - the resource type name
        callback - the callback to execute with the new element data
      • getNewOptions

        public void getNewOptions​(java.lang.String clientId,
                                  I_CmsSimpleCallback<org.opencms.ade.containerpage.shared.CmsDialogOptionsAndInfo> callback)
        Fetches the options for creating a new element from the edit handler.

        Parameters:
        clientId - the client id of the element
        callback - the callback which is called with the result
      • getReturnCode

        public java.lang.String getReturnCode()
        Produces the "return code", which is needed to return to the current page from the sitemap.

        Returns:
        the return code
      • getSerializedContainer

        public org.opencms.ade.containerpage.shared.CmsContainer getSerializedContainer​(java.lang.String data)
                                                                                 throws com.google.gwt.user.client.rpc.SerializationException
        Returns the deserialized element data.

        Parameters:
        data - the data to deserialize
        Returns:
        the container element
        Throws:
        com.google.gwt.user.client.rpc.SerializationException - if deserialization fails
      • getSerializedElement

        public org.opencms.ade.containerpage.shared.CmsContainerElement getSerializedElement​(java.lang.String data)
                                                                                      throws com.google.gwt.user.client.rpc.SerializationException
        Returns the deserialized element data.

        Parameters:
        data - the data to deserialize
        Returns:
        the container element
        Throws:
        com.google.gwt.user.client.rpc.SerializationException - if deserialization fails
      • getView

        public org.opencms.ade.containerpage.shared.CmsElementViewInfo getView​(java.lang.String value)
        Gets the view with the given id.

        Parameters:
        value - the view id as a string
        Returns:
        the view with the given id, or null if no such view is available
      • handleChangeTemplateContext

        public void handleChangeTemplateContext​(CmsContainerPageElementPanel element,
                                                java.lang.String newValue)
        Handler that gets called when the template context setting of an element was changed by the user.

        Parameters:
        element - the element whose template context setting was changed
        newValue - the new value of the setting
      • handleConfirmRemove

        public void handleConfirmRemove​(CmsContainerPageElementPanel element)
        Asks the user for confirmation before removing a container page element.

        Parameters:
        element - the element for which the user should confirm the removal
      • handleDelete

        public void handleDelete​(java.lang.String clientId,
                                 java.lang.String deleteOption,
                                 I_CmsSimpleCallback<java.lang.Void> callback)
        Calls the edit handler to handle the delete action.

        Parameters:
        clientId - the content client id
        deleteOption - the selected delete option
        callback - the callback to execute after the delete
      • hasActiveSelection

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

        Returns:
        true if the selection button is active
      • hasPageChanged

        public boolean hasPageChanged()
        Returns if the page has changed.

        Returns:
        true if the page has changed
      • hideEditableListButtons

        public void hideEditableListButtons()
        Hides list collector direct edit buttons, if present.

      • isContainerEditable

        public boolean isContainerEditable​(I_CmsDropContainer dragParent)
        Returns if the given container is editable.

        Parameters:
        dragParent - the parent container
        Returns:
        true if the given container is editable
      • isContentEditing

        public boolean isContentEditing()
        Returns the flag indicating that a content element is being edited.

        Returns:
        the flag indicating that a content element is being edited
      • isDetailPage

        public boolean isDetailPage()
        Returns if this page displays a detail view.

        Returns:
        true if this page displays a detail view
      • isEditingDisabled

        public boolean isEditingDisabled()
        Checks if the page editing features should be disabled.

        Returns:
        true if the page editing features should be disabled
      • isGroupcontainerEditing

        public boolean isGroupcontainerEditing()
        Returns if a group-container is currently being edited.

        Returns:
        true if a group-container is being edited
      • leaveUnsaved

        public void leaveUnsaved​(java.lang.String targetUri)
        Method to leave the page without saving.

        Parameters:
        targetUri - the new URI to call
      • loadContextMenu

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

        Parameters:
        structureId - the structure id of the resource to get the context menu entries for
        context - the ade context (sitemap or containerpae)
      • loadFavorites

        public void loadFavorites​(I_CmsSimpleCallback<java.util.List<org.opencms.ade.containerpage.shared.CmsContainerElementData>> callback)
        Loads the favorite list and adds the elements to the favorite list widget of the tool-bar menu.

        Parameters:
        callback - the call-back to execute with the result data
      • loadRecent

        public void loadRecent​(I_CmsSimpleCallback<java.util.List<org.opencms.ade.containerpage.shared.CmsContainerElementData>> callback)
        Loads the recent list and adds the elements to the recent list widget of the tool-bar menu.

        Parameters:
        callback - the call-back to execute with the result data
      • matchRootView

        public boolean matchRootView​(org.opencms.util.CmsUUID viewIdFromElement)
        Returns true if the view with the given view id and the current view have the same root view.

        Parameters:
        viewIdFromElement - the id of a view
        Returns:
        true if the root view of the id matches the root view of the current view
      • onLockFail

        public void onLockFail​(java.lang.String lockError)
        This method should be called when locking the page has failed.

        Parameters:
        lockError - the locking information
      • onLockSuccess

        public void onLockSuccess()
        This method should be called when locking the page has succeeded.

      • onWindowClose

        public void onWindowClose()
        Handler which is executed when the window closes.

      • prepareForEdit

        public void prepareForEdit​(java.lang.String clientId,
                                   java.lang.String editOption,
                                   I_CmsSimpleCallback<org.opencms.util.CmsUUID> callback)
        Calls the edit handler to prepare the given content element for editing.

        Parameters:
        clientId - the element id
        editOption - the selected edit option
        callback - the callback to execute
      • reinitializeButtons

        public void reinitializeButtons()
        Reinitializes the buttons in the container element menus.

      • reloadElements

        public void reloadElements​(java.util.Collection<java.lang.String> ids,
                                   java.lang.Runnable callback)
        Reloads the content for the given elements and related elements.
        Parameters:
        ids - the element ids
        callback - the callback to execute after the reload
      • reloadElements

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

        Call this if the element content has changed.

        Parameters:
        ids - the element ids
        callback - the callback to execute after the reload
      • reloadElementWithSettings

        public void reloadElementWithSettings​(CmsContainerPageElementPanel elementWidget,
                                              java.lang.String clientId,
                                              java.util.Map<java.lang.String,​java.lang.String> settings,
                                              I_CmsSimpleCallback<CmsContainerPageElementPanel> afterReloadAction)
        Reloads a container page element with a new set of settings.

        Parameters:
        elementWidget - the widget of the container page element which should be reloaded
        clientId - the id of the container page element which should be reloaded
        settings - the new set of settings
        afterReloadAction - a callback which is executed after the element has been reloaded
      • reloadPage

        public void reloadPage()
        Reloads the page.

      • replaceContainerElement

        public CmsContainerPageElementPanel replaceContainerElement​(CmsContainerPageElementPanel containerElement,
                                                                    org.opencms.ade.containerpage.shared.CmsContainerElementData elementData)
                                                             throws java.lang.Exception
        Replaces the given drag-element with the given container element.

        Parameters:
        containerElement - the container element to replace
        elementData - the new element data
        Returns:
        the container element which replaced the old one
        Throws:
        java.lang.Exception - if something goes wrong
      • replaceElement

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

        Parameters:
        elementWidget - the element to replace
        elementId - the id of the replacing content
        callback - the callback to execute after the element is replaced
      • requiresOptionBar

        public boolean requiresOptionBar​(CmsContainerPageElementPanel element,
                                         I_CmsDropContainer dragParent)
        Checks whether the given element should display the option bar.

        Parameters:
        element - the element
        dragParent - the element parent
        Returns:
        true if the given element should display the option bar
      • resetEditButtons

        public void resetEditButtons()
        Resets all edit buttons an there positions.

      • resetPage

        public void resetPage()
        Resets the container-page.

      • saveAndLeave

        public void saveAndLeave​(com.google.gwt.user.client.Command leaveCommand)
        Method to save and leave the page.

        Parameters:
        leaveCommand - the command to execute to leave the page
      • saveAndLeave

        public void saveAndLeave​(java.lang.String targetUri)
        Method to save and leave the page.

        Parameters:
        targetUri - the new URI to call
      • saveClipboardTab

        public void saveClipboardTab​(int tabIndex)
        Saves the clipboard tab index selected by the user.

        Parameters:
        tabIndex - the tab index
      • saveContainerpage

        public void saveContainerpage​(java.lang.Runnable... afterSaveActions)
        Saves the current state of the container-page.

        Parameters:
        afterSaveActions - the actions to execute after saving
      • saveFavoriteList

        public void saveFavoriteList​(java.util.List<java.lang.String> clientIds)
        Saves the favorite list.

        Parameters:
        clientIds - the client id's of the list's elements
      • saveGroupcontainer

        public void saveGroupcontainer​(org.opencms.ade.containerpage.shared.CmsGroupContainer groupContainer,
                                       CmsGroupContainerElementPanel groupContainerElement)
        Saves the group-container.

        Parameters:
        groupContainer - the group-container data to save
        groupContainerElement - the group-container widget
      • saveInheritContainer

        public void saveInheritContainer​(org.opencms.ade.containerpage.shared.CmsInheritanceContainer inheritanceContainer,
                                         CmsGroupContainerElementPanel groupContainerElement)
        Saves the inheritance container.

        Parameters:
        inheritanceContainer - the inheritance container data to save
        groupContainerElement - the group container widget
      • setContentEditing

        public void setContentEditing​(boolean isContentEditing)
        Sets the flag indicating that a content element is being edited.

        Parameters:
        isContentEditing - the flag indicating that a content element is being edited
      • setElementView

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

        Parameters:
        viewInfo - the element view
        nextAction - the action to execute after setting the view
      • setModelGroupElementId

        public void setModelGroupElementId​(java.lang.String modelGroupElementId)
        Sets the model group base element id.

        Parameters:
        modelGroupElementId - the model group base element id
      • setPageChanged

        public void setPageChanged​(java.lang.Runnable... nextActions)
        Marks the page as changed.

        Parameters:
        nextActions - the actions to perform after the page has been marked as changed
      • shouldShowInContext

        public boolean shouldShowInContext​(org.opencms.ade.containerpage.shared.CmsContainerElementData elementData)
        Method to determine whether a container element should be shown in the current template context.

        Parameters:
        elementData - the element data
        Returns:
        true if the element should be shown
      • startEditingGroupcontainer

        public void startEditingGroupcontainer​(CmsGroupContainerElementPanel groupContainer,
                                               boolean isElementGroup)
        Tells the controller that group-container editing has started.

        Parameters:
        groupContainer - the group container
        isElementGroup - true if the group container is an element group and not an inheritance group
      • stopEditingGroupcontainer

        public void stopEditingGroupcontainer()
        Tells the controller that group-container editing has stopped.

      • unlockResource

        public boolean unlockResource​(org.opencms.util.CmsUUID structureId)
        Unlocks the given resource.

        Parameters:
        structureId - the structure id of the resource to unlock
        Returns:
        true if the resource was unlocked successfully
      • updateServerElementFormatter

        public void updateServerElementFormatter​(java.lang.String clientId,
                                                 java.lang.String containerId,
                                                 java.util.Map<java.lang.String,​java.lang.String> settings)
        Updates the formatter in the server-side element bean.
        Parameters:
        clientId - the client element bean
        containerId - the container id
        settings - the settings
      • addElements

        protected void addElements​(java.util.List<org.opencms.ade.containerpage.shared.CmsContainerElementData> elements)
        Adds the given element data to the element cache.

        Parameters:
        elements - the element data
      • addElements

        protected void addElements​(java.util.Map<java.lang.String,​org.opencms.ade.containerpage.shared.CmsContainerElementData> elements)
        Adds the given element data to the element cache.

        Parameters:
        elements - the element data
      • askWhetherRemovedElementShouldBeDeleted

        protected void askWhetherRemovedElementShouldBeDeleted​(org.opencms.ade.containerpage.shared.CmsRemovedElementStatus status)
        Asks the user whether an element which has been removed should be deleted.

        Parameters:
        status - the status of the removed element
      • checkReferencesToRemovedElement

        protected void checkReferencesToRemovedElement​(java.lang.String id)
        Checks that a removed can be possibly deleted and if so, asks the user if it should be deleted.

        Parameters:
        id - the client id of the element
      • deactivateOnClosing

        protected void deactivateOnClosing()
        Disables option and toolbar buttons.

      • getAllContainerPageElements

        protected java.util.List<CmsContainerPageElementPanelgetAllContainerPageElements​(boolean includeGroupContents)
        Helper method to get all current container page elements.

        Parameters:
        includeGroupContents - true if the contents of group containers should also be included
        Returns:
        the list of current container page elements
      • getCoreService

        protected org.opencms.gwt.shared.rpc.I_CmsCoreServiceAsync getCoreService()
        Returns the core RPC service.

        Returns:
        the core service
      • getLocale

        protected java.lang.String getLocale()
        Returns the content locale.

        Returns:
        the content locale
      • getPageContent

        protected java.util.List<org.opencms.ade.containerpage.shared.CmsContainer> getPageContent()
        Gets the page content for purposes of saving.

        Returns:
        the page content
      • getPageState

        protected java.util.List<org.opencms.ade.containerpage.shared.CmsContainer> getPageState()
        Returns the containers of the page in their current state.

        Returns:
        the containers of the page
      • getRequestParams

        protected java.lang.String getRequestParams()
        Returns the request parameters of the displayed container-page.

        Returns:
        the request parameters
      • hasNestedContainers

        protected boolean hasNestedContainers()
        Checks if any of the containers are nested containers.

        Returns:
        true if there are nested containers
      • isRootContainer

        protected boolean isRootContainer​(org.opencms.ade.containerpage.shared.CmsContainer container)
        Returns whether the given container is considered a root container.

        Parameters:
        container - the container to check
        Returns:
        true if the given container is a root container
      • openEditorForNewElement

        protected void openEditorForNewElement​(CmsContainerPageElementPanel element,
                                               org.opencms.ade.containerpage.shared.CmsContainerElement newElementData,
                                               boolean inline)
        Opens the editor for the newly created element.

        Parameters:
        element - the container element
        newElementData - the new element data
        inline - true to open the inline editor for the given element if available
      • previewNativeEvent

        protected void previewNativeEvent​(com.google.gwt.user.client.Event.NativePreviewEvent event)
        Previews events. Shows the leaving page dialog, if the page has changed and an anchor has been clicked.

        Also triggers an element view change on 'Ctrl+E'.

        Parameters:
        event - the native event
      • removeContainerElements

        protected void removeContainerElements​(java.lang.String resourceId)
        Removes all container elements with the given id from all containers and the client side cache.

        Parameters:
        resourceId - the resource id
      • scheduleGalleryUpdate

        protected void scheduleGalleryUpdate()
        Schedules an update of the gallery data according to the current element view and the editable containers.

      • setPageChanged

        protected void setPageChanged​(boolean changed,
                                      boolean unlock)
        Sets the page changed flag and initializes the window closing handler if necessary.

        Parameters:
        changed - if true the page has changed
        unlock - if true the page will be unlocked for unchanged pages
      • unlockContainerpage

        protected void unlockContainerpage()
        Asynchronously unlocks the container page.