Class CmsAliasView

  • All Implemented Interfaces:
    com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget

    public class CmsAliasView
    extends com.google.gwt.user.client.ui.Composite
    The widget containing the table and the buttons used for editing aliases.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected static interface  CmsAliasView.I_CmsAliasViewUiBinder
      The UiBinder interface for this widget.
      • Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject

        com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clearNew()
      Clears the input fields used to add new aliases.
      void clearRewriteNew()
      Clears the text boxes for adding new rewrites.
      void clearValidationsForNew()
      Clears the validation errors for the text boxes used to add new aliases.
      void close()
      Hides the popup.
      java.util.List<CmsPushButton> getButtonBar()
      Gets the buttons which should be displayed in the button bar of the popup containing this view.
      java.util.List<org.opencms.gwt.shared.alias.CmsAliasTableRow> getLiveData()
      Gets the list of rows used by the data provider.
      java.util.List<org.opencms.gwt.shared.alias.CmsRewriteAliasTableRow> getRewriteData()
      Gets the rewrite alias data.
      CmsRewriteAliasTable getRewriteTable()
      Gets the rewrite alias cell table.
      CmsAliasCellTable getTable()
      Gets the cell table used to edit the alias data.
      protected void onClickDeleteRewrite​(com.google.gwt.event.dom.client.ClickEvent e)
      The event handler for the button to delete rewrite aliases.
      void setData​(java.util.List<org.opencms.gwt.shared.alias.CmsAliasTableRow> data, java.util.List<org.opencms.gwt.shared.alias.CmsRewriteAliasTableRow> rewriteData)
      Replaces the contents of the live data row list with another list of rows.
      void setDeleteButtonEnabled​(boolean enabled)
      Enables or disables the delete button.
      void setNewAliasPathError​(java.lang.String error)
      Sets the validation error message for the alias path text box.
      void setNewAliasResourceError​(java.lang.String error)
      Sets the validation error message for the resource path text box.
      void setPopup​(CmsPopup popup)
      Sets the popup used to display this widget.
      void setRewriteDeleteButtonEnabled​(boolean enabled)
      Enables or disables the delete button for rewrite aliases.
      void setSaveButtonEnabled​(boolean enabled)
      Enables or disables the save button.
      void sortByErrors()
      Ensures that rows with errors will be placed at the top of the table.
      void update​(java.util.List<org.opencms.gwt.shared.alias.CmsAliasTableRow> data)
      Updates the table data with a new list of rows.
      void update​(org.opencms.gwt.shared.alias.CmsRewriteAliasValidationReply result)
      Updates the view after the rewrite aliases have been validated.
      • Methods inherited from class com.google.gwt.user.client.ui.Composite

        claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
      • Methods inherited from class com.google.gwt.user.client.ui.Widget

        addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
      • Methods inherited from class com.google.gwt.user.client.ui.UIObject

        addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • clearNew

        public void clearNew()
        Clears the input fields used to add new aliases.

      • clearRewriteNew

        public void clearRewriteNew()
        Clears the text boxes for adding new rewrites.

      • clearValidationsForNew

        public void clearValidationsForNew()
        Clears the validation errors for the text boxes used to add new aliases.

      • close

        public void close()
        Hides the popup.

      • getButtonBar

        public java.util.List<CmsPushButtongetButtonBar()
        Gets the buttons which should be displayed in the button bar of the popup containing this view.

        Returns:
        the buttons for the popup button bar
      • getLiveData

        public java.util.List<org.opencms.gwt.shared.alias.CmsAliasTableRow> getLiveData()
        Gets the list of rows used by the data provider.

        Returns:
        the list of rows used by the data provider
      • getRewriteData

        public java.util.List<org.opencms.gwt.shared.alias.CmsRewriteAliasTableRow> getRewriteData()
        Gets the rewrite alias data.

        Returns:
        the rewrite alias list
      • getTable

        public CmsAliasCellTable getTable()
        Gets the cell table used to edit the alias data.

        Returns:
        the alias cell table
      • setData

        public void setData​(java.util.List<org.opencms.gwt.shared.alias.CmsAliasTableRow> data,
                            java.util.List<org.opencms.gwt.shared.alias.CmsRewriteAliasTableRow> rewriteData)
        Replaces the contents of the live data row list with another list of rows.

        Parameters:
        data - the new list of rows to be placed into the live data list
        rewriteData - the list of rewrite alias data
      • setDeleteButtonEnabled

        public void setDeleteButtonEnabled​(boolean enabled)
        Enables or disables the delete button.

        Parameters:
        enabled - if true, the delete button will be enabled, else disabled
      • setNewAliasPathError

        public void setNewAliasPathError​(java.lang.String error)
        Sets the validation error message for the alias path text box.

        Parameters:
        error - the validation error message
      • setNewAliasResourceError

        public void setNewAliasResourceError​(java.lang.String error)
        Sets the validation error message for the resource path text box.

        Parameters:
        error - the validation error message
      • setPopup

        public void setPopup​(CmsPopup popup)
        Sets the popup used to display this widget.

        Parameters:
        popup - the popup instance
      • setRewriteDeleteButtonEnabled

        public void setRewriteDeleteButtonEnabled​(boolean enabled)
        Enables or disables the delete button for rewrite aliases.

        Parameters:
        enabled - true if the delete button should be enabled
      • setSaveButtonEnabled

        public void setSaveButtonEnabled​(boolean enabled)
        Enables or disables the save button.

        Parameters:
        enabled - true if the save button should be enabled, false if it should be disabled
      • sortByErrors

        public void sortByErrors()
        Ensures that rows with errors will be placed at the top of the table.

      • update

        public void update​(org.opencms.gwt.shared.alias.CmsRewriteAliasValidationReply result)
        Updates the view after the rewrite aliases have been validated.

        Parameters:
        result - the result of the rewrite alias validation
      • update

        public void update​(java.util.List<org.opencms.gwt.shared.alias.CmsAliasTableRow> data)
        Updates the table data with a new list of rows.

        Rows in the table for which a row with the same key is also contained in the 'data' parameter will be updated, the other rows from the 'data' list will be added.

        Parameters:
        data - the list of rows to update
      • onClickDeleteRewrite

        @UiHandler("m_rewriteDeleteButton")
        protected void onClickDeleteRewrite​(com.google.gwt.event.dom.client.ClickEvent e)
        The event handler for the button to delete rewrite aliases.

        Parameters:
        e - the click event