Class CmsAliasView

java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
org.opencms.ade.sitemap.client.alias.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 
    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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected CmsPushButton
    The 'Cancel' button.
    The alias table controller.
    protected com.google.gwt.user.client.ui.HasText
    Text container for the row count.
    protected CmsPushButton
    The 'Delete' button.
    protected CmsPushButton
    The 'Download' button.
    protected CmsTextBox
    The text box for entering the path for a new alias.
    protected CmsPushButton
    The button for adding a new alias.
    protected CmsSelectBox
    The select box for selecting the mode of a new alias.
    protected CmsTextBox
    The text box for entering the resource path for a new alias.
    protected CmsPushButton
    The button for adding a new rewrite alias.
    protected CmsSelectBox
    The select box for selecting a mode for new rewrite aliases.
    protected CmsTextBox
    The text box for entering a new rewrite pattern.
    protected CmsTextBox
    The text box for entering a new rewrite replacement string.
    protected CmsPushButton
    The button for deleting rewrite aliases.
    protected com.google.gwt.user.client.ui.Panel
    The container for the rewrite table.
    protected CmsPushButton
    The button for saving the alias table.
    protected com.google.gwt.user.client.ui.Panel
    The panel containing the alias cell table.
    protected CmsPushButton
    The button for importing alias CSV files.

    Fields inherited from class com.google.gwt.user.client.ui.UIObject

    DEBUG_ID_PREFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates new view instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears the input fields used to add new aliases.
    void
    Clears the text boxes for adding new rewrites.
    void
    Clears the validation errors for the text boxes used to add new aliases.
    void
    Hides the popup.
    Gets the buttons which should be displayed in the button bar of the popup containing this view.
    List<org.opencms.gwt.shared.alias.CmsAliasTableRow>
    Gets the list of rows used by the data provider.
    List<org.opencms.gwt.shared.alias.CmsRewriteAliasTableRow>
    Gets the rewrite alias data.
    Gets the rewrite alias cell table.
    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(List<org.opencms.gwt.shared.alias.CmsAliasTableRow> data, 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
    Sets the validation error message for the alias path text box.
    void
    Sets the validation error message for the resource path text box.
    void
    Sets the popup used to display this widget.
    void
    Enables or disables the delete button for rewrite aliases.
    void
    setSaveButtonEnabled(boolean enabled)
    Enables or disables the save button.
    void
    Ensures that rows with errors will be placed at the top of the table.
    void
    update(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
  • Field Details

  • Constructor Details

  • Method Details

    • 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

      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 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 List<org.opencms.gwt.shared.alias.CmsRewriteAliasTableRow> getRewriteData()
      Gets the rewrite alias data.

      Returns:
      the rewrite alias list
    • getRewriteTable

      Gets the rewrite alias cell table.

      Returns:
      the rewrite alias cell table
    • getTable

      Gets the cell table used to edit the alias data.

      Returns:
      the alias cell table
    • setData

      public void setData(List<org.opencms.gwt.shared.alias.CmsAliasTableRow> data, 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(String error)
      Sets the validation error message for the alias path text box.

      Parameters:
      error - the validation error message
    • setNewAliasResourceError

      public void setNewAliasResourceError(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(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