Class CmsImportView
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.CmsImportView
- 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
This widget is used for importing aliases by uploading a CSV file.
It contains buttons for uploading a file, a form used to submit the file to the server, and an area used for displaying the result of the import operation on the server.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected 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
Modifier and TypeFieldDescriptionprotected com.google.gwt.user.client.ui.FormPanel
The actual form.protected com.google.gwt.user.client.ui.FlowPanel
The panel containing the form elements.protected com.google.gwt.user.client.ui.Label
The label containing the path or name of the CSV file to import.protected CmsImportResultList
The panel containing the results of the server-side import operation.protected CmsScrollPanel
The scroll panel containing the import results.protected com.google.gwt.user.client.ui.HasText
Text box for setting the separator.protected CmsPushButton
The button used to submit the file which should be imported to the server.protected CmsUploadButton
The upload button.Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addImportResult
(org.opencms.gwt.shared.alias.CmsAliasImportResult result) Adds an import result to the displayed list of import results.protected void
Clears the panel used to display the import results.protected void
handleImportResults
(List<org.opencms.gwt.shared.alias.CmsAliasImportResult> results) Processes the result of the import operation from the server.protected void
Initializes the form used for submitting the alias CSV file to the server.void
onClickSubmit
(com.google.gwt.event.dom.client.ClickEvent event) The event handler for the submit button.static void
Shows a popup containing the import view.protected void
updatePath
(String path) Updates the path of the file to import.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 Details
-
m_formPanel
The actual form. -
m_formPanelContents
The panel containing the form elements. -
m_pathLabel
The label containing the path or name of the CSV file to import. -
m_results
The panel containing the results of the server-side import operation. -
m_scrollPanel
The scroll panel containing the import results. -
m_separator
Text box for setting the separator. -
m_submitButton
The button used to submit the file which should be imported to the server. -
m_uploadButton
The upload button.
-
-
Constructor Details
-
CmsImportView
public CmsImportView()Creates a new widget instance.
-
-
Method Details
-
showPopup
Shows a popup containing the import view. -
onClickSubmit
@UiHandler("m_submitButton") public void onClickSubmit(com.google.gwt.event.dom.client.ClickEvent event) The event handler for the submit button.- Parameters:
event
- the click event
-
clearResults
Clears the panel used to display the import results. -
handleImportResults
Processes the result of the import operation from the server.- Parameters:
results
- the string containing the results of the import sent by the server
-
initializeForm
Initializes the form used for submitting the alias CSV file to the server. -
updatePath
Updates the path of the file to import.- Parameters:
path
- the new path
-