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

public class CmsImportView extends com.google.gwt.user.client.ui.Composite
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 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 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.
    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

    Constructors
    Constructor
    Description
    Creates a new widget instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • m_formPanel

      @UiField protected com.google.gwt.user.client.ui.FormPanel m_formPanel
      The actual form.
    • m_formPanelContents

      @UiField protected com.google.gwt.user.client.ui.FlowPanel m_formPanelContents
      The panel containing the form elements.
    • m_pathLabel

      @UiField protected com.google.gwt.user.client.ui.Label m_pathLabel
      The label containing the path or name of the CSV file to import.
    • m_results

      @UiField protected CmsImportResultList m_results
      The panel containing the results of the server-side import operation.
    • m_scrollPanel

      @UiField protected CmsScrollPanel m_scrollPanel
      The scroll panel containing the import results.
    • m_separator

      @UiField protected com.google.gwt.user.client.ui.HasText m_separator
      Text box for setting the separator.
    • m_submitButton

      @UiField protected CmsPushButton 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

      public static void 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
    • addImportResult

      protected void addImportResult(org.opencms.gwt.shared.alias.CmsAliasImportResult result)
      Adds an import result to the displayed list of import results.

      Parameters:
      result - the result to add
    • clearResults

      protected void clearResults()
      Clears the panel used to display the import results.

    • handleImportResults

      protected void handleImportResults(List<org.opencms.gwt.shared.alias.CmsAliasImportResult> results)
      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

      protected void initializeForm()
      Initializes the form used for submitting the alias CSV file to the server.

    • updatePath

      protected void updatePath(String path)
      Updates the path of the file to import.

      Parameters:
      path - the new path