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
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceThe 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
FieldsModifier and TypeFieldDescriptionprotected com.google.gwt.user.client.ui.FormPanelThe actual form.protected com.google.gwt.user.client.ui.FlowPanelThe panel containing the form elements.protected com.google.gwt.user.client.ui.LabelThe label containing the path or name of the CSV file to import.protected CmsImportResultListThe panel containing the results of the server-side import operation.protected CmsScrollPanelThe scroll panel containing the import results.protected com.google.gwt.user.client.ui.HasTextText box for setting the separator.protected CmsPushButtonThe button used to submit the file which should be imported to the server.protected CmsUploadButtonThe upload button.Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddImportResult(org.opencms.gwt.shared.alias.CmsAliasImportResult result) Adds an import result to the displayed list of import results.protected voidClears the panel used to display the import results.protected voidhandleImportResults(List<org.opencms.gwt.shared.alias.CmsAliasImportResult> results) Processes the result of the import operation from the server.protected voidInitializes the form used for submitting the alias CSV file to the server.voidonClickSubmit(com.google.gwt.event.dom.client.ClickEvent event) The event handler for the submit button.static voidShows a popup containing the import view.protected voidupdatePath(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, setWidgetMethods 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, unsinkEventsMethods 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
-