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
CmsAliasView.I_CmsAliasViewUiBinder
The UiBinder interface for this widget.
-
Field Summary
Fields Modifier and Type Field Description protected CmsPushButton
m_cancelButton
The 'Cancel' button.protected CmsAliasTableController
m_controller
The alias table controller.protected com.google.gwt.user.client.ui.HasText
m_countLabel
Text container for the row count.protected CmsPushButton
m_deleteButton
The 'Delete' button.protected CmsPushButton
m_downloadButton
The 'Download' button.protected CmsTextBox
m_newAliasPath
The text box for entering the path for a new alias.protected CmsPushButton
m_newButton
The button for adding a new alias.protected CmsSelectBox
m_newMode
The select box for selecting the mode of a new alias.protected CmsTextBox
m_newResourcePath
The text box for entering the resource path for a new alias.protected CmsPushButton
m_newRewriteButton
The button for adding a new rewrite alias.protected CmsSelectBox
m_newRewriteMode
The select box for selecting a mode for new rewrite aliases.protected CmsTextBox
m_newRewriteRegex
The text box for entering a new rewrite pattern.protected CmsTextBox
m_newRewriteReplacement
The text box for entering a new rewrite replacement string.protected CmsPushButton
m_rewriteDeleteButton
The button for deleting rewrite aliases.protected com.google.gwt.user.client.ui.Panel
m_rewriteTableContainer
The container for the rewrite table.protected CmsPushButton
m_saveButton
The button for saving the alias table.protected com.google.gwt.user.client.ui.Panel
m_tableContainer
The panel containing the alias cell table.protected CmsPushButton
m_uploadButton
The button for importing alias CSV files.
-
Constructor Summary
Constructors Constructor Description CmsAliasView(CmsAliasTableController controller)
Creates new view instance.
-
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
-
-
-
-
Field Detail
-
m_cancelButton
@UiField protected CmsPushButton m_cancelButton
The 'Cancel' button.
-
m_controller
protected CmsAliasTableController m_controller
The alias table controller.
-
m_countLabel
@UiField protected com.google.gwt.user.client.ui.HasText m_countLabel
Text container for the row count.
-
m_deleteButton
@UiField protected CmsPushButton m_deleteButton
The 'Delete' button.
-
m_downloadButton
@UiField protected CmsPushButton m_downloadButton
The 'Download' button.
-
m_newAliasPath
@UiField protected CmsTextBox m_newAliasPath
The text box for entering the path for a new alias.
-
m_newButton
@UiField protected CmsPushButton m_newButton
The button for adding a new alias.
-
m_newMode
@UiField protected CmsSelectBox m_newMode
The select box for selecting the mode of a new alias.
-
m_newResourcePath
@UiField protected CmsTextBox m_newResourcePath
The text box for entering the resource path for a new alias.
-
m_newRewriteButton
@UiField protected CmsPushButton m_newRewriteButton
The button for adding a new rewrite alias.
-
m_newRewriteMode
@UiField protected CmsSelectBox m_newRewriteMode
The select box for selecting a mode for new rewrite aliases.
-
m_newRewriteRegex
@UiField protected CmsTextBox m_newRewriteRegex
The text box for entering a new rewrite pattern.
-
m_newRewriteReplacement
@UiField protected CmsTextBox m_newRewriteReplacement
The text box for entering a new rewrite replacement string.
-
m_rewriteDeleteButton
@UiField protected CmsPushButton m_rewriteDeleteButton
The button for deleting rewrite aliases.
-
m_rewriteTableContainer
@UiField protected com.google.gwt.user.client.ui.Panel m_rewriteTableContainer
The container for the rewrite table.
-
m_saveButton
@UiField protected CmsPushButton m_saveButton
The button for saving the alias table.
-
m_tableContainer
@UiField protected com.google.gwt.user.client.ui.Panel m_tableContainer
The panel containing the alias cell table.
-
m_uploadButton
@UiField protected CmsPushButton m_uploadButton
The button for importing alias CSV files.
-
-
Constructor Detail
-
CmsAliasView
public CmsAliasView(CmsAliasTableController controller)
Creates new view instance.- Parameters:
controller
- the controller for the view
-
-
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<CmsPushButton> 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 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
-
getRewriteTable
public CmsRewriteAliasTable getRewriteTable()
Gets the rewrite alias cell table.- Returns:
- the rewrite alias cell table
-
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 listrewriteData
- 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
-
-