com.smartgwt.client.widgets

## Class BatchUploader

- java.lang.Object
- - com.google.gwt.user.client.ui.UIObject
  - - com.google.gwt.user.client.ui.Widget
    - - com.smartgwt.client.widgets.BaseWidget
      - - com.smartgwt.client.widgets.Canvas
        - - com.smartgwt.client.widgets.BatchUploader

- 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.IsWidget, LogicalStructure, HasClickHandlers, HasDoubleClickHandlers, HasDragMoveHandlers, HasDragRepositionMoveHandlers, HasDragRepositionStartHandlers, HasDragRepositionStopHandlers, HasDragResizeMoveHandlers, HasDragResizeStartHandlers, HasDragResizeStopHandlers, HasDragStartHandlers, HasDragStopHandlers, HasDropHandlers, HasDropMoveHandlers, HasDropOutHandlers, HasDropOverHandlers, HasFocusChangedHandlers, HasHoverHandlers, HasHoverHiddenHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseStillDownHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasMovedHandlers, HasParentMovedHandlers, HasResizedHandlers, HasRightMouseDownHandlers, HasScrolledHandlers, HasShowContextMenuHandlers, HasVisibilityChangedHandlers
  Direct Known Subclasses:
    BatchUploader

      public class BatchUploader
      extends Canvas

  NOTE: BatchUploader is only available with Smart GWT Power or better.

  The BatchUploader handles the upload, validation, review and saving of a dataset expressed in CSV or other upload formats.

  By default, a BatchUploader consists of a single `FileItem` form field. This form field will upload a file using the special "batchUpload" built-in DataSource. The uploaded file data will be parsed and validated using the `uploadDataSource`, then streamed back to the browser, along with any errors, for display in a ListGrid.

  The user can then correct any errors and submit the final dataset, which will be added to the DataSource via a series of "add" DSRequests, all submitted as a single HTTP request via `request queuing`.

  Additional form fields can be added to the form that uploads the data file via `uploadFormFields`. Values entered into these fields are not included in the "add" DSRequests used to store the uploaded records. Instead, they are stored as HttpSession attributes with the names corresponding to the names of the specified `uploadFormFields` (optionally with a `prefix` applied, in case this is necessary to avoid name collisions in the session). This allows any custom logic for the "add" operation to access these additional fields via httpSession.getAttribute().

  Because all records are saved in a single HTTP request, a similar strategy of storing data as servletRequest or session attributes allows reuse of objects required to perform the "add" operations (such as field values common to all added records, or a SQL connection or transaction manager).

  If `uploadFieldName` is set on any of the `uploadDataSource`'s fields, the BatchUploader will use that name to map the uploaded file's content.

  A couple of server-side techniques are interesting in conjunction with the BatchUploader. One is to set the `serverConstructor` property to point at your own class that inherits from `com.isomorphic.datasource.DataSource`. The most interesting reason for doing this is to override the `validate` method and provide complete custom validation - for example, checking relations to other tables.

  Another technique is to handle the initial Smart GWT call in your own servlet, by setting the `dataURL` property. You then handle the add requests with a combination of your own code and Smart GWT server API calls. This is a good way to add special pre- and post-processing to the normal server-side flow.

  The BatchUploader sample, provided as one of the databinding examples, demonstrates both of these techniques. We use a special subclass of DataSource and override the validate method as described above; we also set `dataURL` to point at a JSP that wraps the queue of Smart GWT requests inside a single database transaction (a servlet would be more usual, but we use a JSP for ease of modification)

  Note: The special "batchUpload" DataSource, which should reside in the shared/ds folder of your application's webroot (see `iscInstall`), is not part of your application's data flow, and it has nothing to do with the `uploadDataSource` you use to actually persist the validated and error-corrected data: it is simply a means to uploading the raw data in the first place. Normally, you should simply ignore its presence and treat it as an internal detail of the Smart GWT framework.

  However, there are circumstances in which you may wish to change it to achieve specific aims. For example, you may wish to override the Java class it invokes, in order to insert your own security or other validation logic into the initial upload flow. This is entirely in keeping with the design, but we regard it as an out-of-the-ordinary use-case: normal usage is simply to ignore the presence of the batchUpload DataSource.

- - ### Nested Class Summary

    - ### 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 inherited from class com.smartgwt.client.widgets.BaseWidget

      `config, configOnly, id, isElementSet, nativeObject, scClassName`

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

      `DEBUG_ID_PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BatchUploader()`
    `BatchUploader(com.google.gwt.core.client.JavaScriptObject jsObj)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `changeAutoChildDefaults(java.lang.String autoChildName, Canvas defaults)` Changes the defaults for Canvas AutoChildren named `autoChildName`.
    `static void` | `changeAutoChildDefaults(java.lang.String autoChildName, FormItem defaults)` Changes the defaults for FormItem AutoChildren named `autoChildName`.
    `com.google.gwt.core.client.JavaScriptObject` | `create()`
    `IButton` | `getCancelButton()` Button that cancels the uncommitted upload.
    `java.lang.String` | `getCancelConfirmMessage()` Confirmation message to show if the user clicks the "Cancel" button and `warnOnCancel` is true.
    `IButton` | `getCommitButton()` Button that commits changes once the user is happy with the data.
    `java.lang.String` | `getCommitConfirmationMessage()` Message to display after data has been committed, when `showCommitConfirmation` is true.
    `java.lang.String` | `getDataURL()` If set, the batchUploader will copy this value to the queue of "add" requests it sends to the server to actually populate the data.
    `java.lang.String` | `getDefaultDelimiter()` The delimiter to use when importing character-delimited files.
    `java.lang.String` | `getDefaultQuoteString()` The default character used to quote strings.
    `ListGrid` | `getGrid()` Grid which will show a preview of data to be uploaded, with errors flagged
    `ListGridField[]` | `getGridFields()` The ListGrid fields
    `com.smartgwt.logicalstructure.core.LogicalStructureObject` | `getLogicalStructure()`
    `static BatchUploader` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `PartialCommitOption` | `getPartialCommit()` Specifies what action to take if the user attempts to commit a partially validated set of data (ie, one that still contains some errors).
    `java.lang.String` | `getPartialCommitError()` If `partialCommit` is set to "prevent", the text to display to the user if they try to commit a dataset containing errors.
    `java.lang.String` | `getPartialCommitPrompt()` If `partialCommit` is set to "prompt", the text to display to the user in the confirmation dialog.
    `java.util.Map` | `getRequestProperties()` Object containing properties to send with every "add" request this batchUploader sends.
    `java.lang.Boolean` | `getShowCommitConfirmation()` Whether to show the `commit message` after data is successfully committed.
    `IButton` | `getUploadButton()` Button that triggers the upload.
    `java.lang.String` | `getUploadButtonTitle()` Title for the `upload button`.
    `DataSource` | `getUploadDataSource()` DataSource used to save uploaded records.
    `java.lang.String` | `getUploadFieldPrefix()` String to prepend to the names of the additional fields specified in `uploadFormFields` before they are stored in the HttpSession on the server.
    `java.lang.String` | `getUploadFileLabel()` Title to display next to the `FileItem` field where the user enters a filename to upload
    `DynamicForm` | `getUploadForm()` Form used to specify file to upload, and any additional fields required.
    `FormItem[]` | `getUploadFormFields()` Optional fields for the uploadForm.
    `java.lang.String` | `getUploadOperation()` Optional `operationId` for the "add" operation used to add new records to the `uploadDataSource`.
    `java.lang.Boolean` | `getWarnOnCancel()` If set, indicates that a warning dialog should be shown when Cancel is clicked, asking the user to confirm that this is really what they want to do.
    `void` | `setCancelConfirmMessage(java.lang.String cancelConfirmMessage)` Confirmation message to show if the user clicks the "Cancel" button and `warnOnCancel` is true.
    `void` | `setCommitConfirmationMessage(java.lang.String commitConfirmationMessage)` Message to display after data has been committed, when `showCommitConfirmation` is true.
    `void` | `setDataURL(java.lang.String dataURL)` If set, the batchUploader will copy this value to the queue of "add" requests it sends to the server to actually populate the data.
    `void` | `setDefaultDelimiter(java.lang.String defaultDelimiter)` The delimiter to use when importing character-delimited files.
    `static void` | `setDefaultProperties(BatchUploader batchUploaderProperties)` Class level method to set the default properties of this class.
    `void` | `setDefaultQuoteString(java.lang.String defaultQuoteString)` The default character used to quote strings.
    `void` | `setGridFields(ListGridField... fields)`
    `void` | `setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `com.smartgwt.logicalstructure.core.LogicalStructureObject` | `setLogicalStructure(com.smartgwt.logicalstructure.widgets.BatchUploaderLogicalStructure s)`
    `void` | `setPartialCommit(PartialCommitOption partialCommit)` Specifies what action to take if the user attempts to commit a partially validated set of data (ie, one that still contains some errors).
    `void` | `setPartialCommitError(java.lang.String partialCommitError)` If `partialCommit` is set to "prevent", the text to display to the user if they try to commit a dataset containing errors.
    `void` | `setPartialCommitPrompt(java.lang.String partialCommitPrompt)` If `partialCommit` is set to "prompt", the text to display to the user in the confirmation dialog.
    `void` | `setRequestProperties(java.util.Map params)` Object containing properties to send with every "add" request this batchUploader sends.
    `void` | `setShowCommitConfirmation(java.lang.Boolean showCommitConfirmation)` Whether to show the `commit message` after data is successfully committed.
    `void` | `setUploadButtonTitle(java.lang.String uploadButtonTitle)` Title for the `upload button`.
    `void` | `setUploadDataSource(DataSource uploadDataSource)` DataSource used to save uploaded records.
    `void` | `setUploadFieldPrefix(java.lang.String uploadFieldPrefix)` String to prepend to the names of the additional fields specified in `uploadFormFields` before they are stored in the HttpSession on the server.
    `void` | `setUploadFileLabel(java.lang.String uploadFileLabel)` Title to display next to the `FileItem` field where the user enters a filename to upload
    `void` | `setUploadFormFields(FormItem... uploadFormFields)` Optional fields for the uploadForm.
    `void` | `setUploadFormItems(FormItem... items)` Synonym of `setUploadFormFields(FormItem...)`.
    `void` | `setUploadOperation(java.lang.String uploadOperation)` Optional `operationId` for the "add" operation used to add new records to the `uploadDataSource`.
    `void` | `setWarnOnCancel(java.lang.Boolean warnOnCancel)` If set, indicates that a warning dialog should be shown when Cancel is clicked, asking the user to confirm that this is really what they want to do.

    - ### Methods inherited from class com.smartgwt.client.widgets.Canvas

      `addChild, addChild, addChild, addChild, addChild, addClickHandler, addDoubleClickHandler, addDragMoveHandler, addDragRepositionMoveHandler, addDragRepositionStartHandler, addDragRepositionStopHandler, addDragResizeMoveHandler, addDragResizeStartHandler, addDragResizeStopHandler, addDragStartHandler, addDragStopHandler, addDropHandler, addDropMoveHandler, addDropOutHandler, addDropOverHandler, addFocusChangedHandler, addHoverHandler, addHoverHiddenHandler, addKeyDownHandler, addKeyPressHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseStillDownHandler, addMouseUpHandler, addMouseWheelHandler, addMovedHandler, addParentMovedHandler, addPeer, addPeer, addPeer, addPeer, addResizedHandler, addRightMouseDownHandler, addScrolledHandler, addShowContextMenuHandler, addStyleName, addVisibilityChangedHandler, adjustForContent, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateHide, animateHide, animateHide, animateMove, animateMove, animateMove, animateMove, animateRect, animateRect, animateRect, animateRect, animateResize, animateResize, animateResize, animateResize, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateShow, animateShow, animateShow, asSGWTComponent, blur, bringToFront, clear, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsFocus, containsPoint, containsPoint, deparent, depeer, disable, enable, focus, focusInNextTabElement, focusInPreviousTabElement, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowEffect, getAnimateShowTime, getAnimateTime, getAppImgDir, getAriaRole, getAutoDraw, getAutoShowParent, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBottom, getById, getByJSObject, getByLocalId, getCanAcceptDrop, getCanDrag, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanFocus, getCanHover, getCanSelectText, getCanvasAutoChild, getCanvasItem, getChildren, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getClassName, getContentElement, getContents, getContextMenu, getCursor, getDataPath, getDefaultHeight, getDefaultWidth, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragOpacity, getDragRepositionAppearance, getDragRepositionCursor, getDragResizeAppearance, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragType, getDropTypes, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeMarginSize, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getEventEdge, getEventEdge, getExtraSpace, getFacetId, getFormItemAutoChild, getFullDataPath, getGroupBorderCSS, getGroupLabelBackgroundColor, getGroupLabelStyleName, getGroupTitle, getHeight, getHeightAsString, getHideUsingDisplayNone, getHoverAlign, getHoverAutoDestroy, getHoverComponent, getHoverDelay, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapOrigin, getHSnapOrigin, getHSnapPosition, getHSnapPosition, getHtmlPosition, getImage, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getKeepInParentRect, getLayoutAlign, getLeft, getLeftAsString, getLocateChildrenBy, getLocateChildrenType, getLocatePeersBy, getLocatePeersType, getMargin, getMasterElement, getMatchElement, getMaxHeight, getMaxWidth, getMenuConstructor, getMinHeight, getMinWidth, getMouseStillDownDelay, getMouseStillDownInitialDelay, getNextZIndex, getNoDoubleClicks, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getOuterElement, getOverflow, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getParentElement, getPeers, getPercentBox, getPercentSource, getPosition, getPrefix, getPrintChildrenAbsolutelyPositioned, getPrintHTML, getPrintHTML, getPrompt, getRect, getRedrawOnResize, getResizeBarTarget, getResizeFrom, getRight, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowDepth, getShadowImage, getShadowOffset, getShadowSoftness, getShouldPrint, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowHoverComponents, getShowResizeBar, getShowShadow, getSkinImgDir, getSnapAxis, getSnapEdge, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapResizeToGrid, getSnapTo, getSnapToGrid, getSnapVDirection, getSnapVGap, getStyleName, getTabIndex, getTestInstance, getTitle, getTooltip, getTop, getTopAsString, getTopElement, getUseBackMask, getUseOpacityFilter, getValuesManager, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWidth, getVSnapOrigin, getVSnapOrigin, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideContextMenu, imgHTML, imgHTML, imgHTML, intersects, isDirty, isDisabled, isDrawn, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, onAttach, onDetach, onInit, parentResized, printComponents, redraw, redraw, removeChild, removeChild, removePeer, removePeer, resizeBy, resizeTo, resizeTo, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAlign, setAllowExternalFilters, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowEffect, setAnimateShowTime, setAnimateTime, setAppImgDir, setAriaRole, setAriaState, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setAutoDraw, setAutoHeight, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBottom, setCanAcceptDrop, setCanDrag, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanFocus, setCanHover, setCanSelectText, setCanvasItem, setChildren, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setContents, setContextMenu, setCursor, setDataPath, setDefaultHeight, setDefaultProperties, setDefaultWidth, setDisabled, setDisabledCursor, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragOpacity, setDragRepositionAppearance, setDragRepositionCursor, setDragResizeAppearance, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragType, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setExtraSpace, setFacetId, setGroupBorderCSS, setGroupLabelBackgroundColor, setGroupLabelStyleName, setGroupTitle, setHeight, setHeight, setHeight100, setHideUsingDisplayNone, setHoverAlign, setHoverAutoDestroy, setHoverDelay, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlPosition, setImage, setImage, setIsGroup, setKeepInParentRect, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeft, setLeft, setLocateChildrenBy, setLocateChildrenType, setLocatePeersBy, setLocatePeersType, setLogicalStructure, setMargin, setMatchElement, setMaxHeight, setMaxWidth, setMenuConstructor, setMinHeight, setMinWidth, setMouseStillDownDelay, setMouseStillDownInitialDelay, setNeverUseFilters, setNoDoubleClicks, setOpacity, setOverflow, setPadding, setPageLeft, setPageTop, setParentElement, setPeers, setPercentBox, setPercentSource, setPosition, setPrefix, setPrintChildrenAbsolutelyPositioned, setPrompt, setRect, setRect, setRedrawOnResize, setResizeBarTarget, setResizeFrom, setResizeFrom, setRight, setScrollbarConstructor, setScrollbarSize, setShadowDepth, setShadowImage, setShadowOffset, setShadowSoftness, setShouldPrint, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowHoverComponents, setShowResizeBar, setShowShadow, setSkinImgDir, setSmoothFade, setSnapAxis, setSnapEdge, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToGrid, setSnapTo, setSnapToGrid, setSnapVDirection, setSnapVGap, setStyleName, setTabIndex, setTitle, setTooltip, setTop, setTop, setUseBackMask, setUseOpacityFilter, setValuesManager, setVisibility, setVisible, setWidth, setWidth, setWidth100, setZIndex, shouldDragScroll, show, showClickMask, showNextTo, showNextTo, showNextTo, showNextTo, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, updateHover, updateHover, updateShadow, visibleAtPoint, willAcceptDrop`

    - ### Methods inherited from class com.smartgwt.client.widgets.BaseWidget

      `addDrawHandler, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDateArray, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsFloatArray, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getElement, getElement, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, getScClassName, hashCode, initNativeObject, internalSetID, internalSetID, isConfigOnly, isCreated, onBind, onDestroy, onDraw, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setDragTracker, setElement, setHtmlElement, setID, setLogicalStructure, setNullProperty, setPosition, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setScClassName, toString`

    - ### Methods inherited from class com.google.gwt.user.client.ui.Widget

      `addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents`

    - ### Methods inherited from class com.google.gwt.user.client.ui.UIObject

      `addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.google.gwt.event.shared.HasHandlers

      `fireEvent`

- - ### Constructor Detail

    - #### BatchUploader

          public BatchUploader()

    - #### BatchUploader

          public BatchUploader(com.google.gwt.core.client.JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static BatchUploader getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### setJavaScriptObject

          public void setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)

      Overrides:
        `setJavaScriptObject` in class `Canvas`

    - #### changeAutoChildDefaults

          public static void changeAutoChildDefaults(java.lang.String autoChildName,
                                     Canvas defaults)

      Changes the defaults for Canvas AutoChildren named `autoChildName`.
      Parameters:
        `autoChildName` - name of an AutoChild to customize the defaults for.
        `defaults` - Canvas defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties.
      See Also:
        `AutoChildUsage`

    - #### changeAutoChildDefaults

          public static void changeAutoChildDefaults(java.lang.String autoChildName,
                                     FormItem defaults)

      Changes the defaults for FormItem AutoChildren named `autoChildName`.
      Parameters:
        `autoChildName` - name of an AutoChild to customize the defaults for.
        `defaults` - FormItem defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties.
      See Also:
        `AutoChildUsage`

    - #### create

          public com.google.gwt.core.client.JavaScriptObject create()

      Overrides:
        `create` in class `Canvas`

    - #### getCancelButton

          public IButton getCancelButton()
                                  throws java.lang.IllegalStateException

      Button that cancels the uncommitted upload.

      For an overview of how to use and configure AutoChildren, see `Using AutoChildren`.

      Returns:
        IButton
      Throws:
        `java.lang.IllegalStateException` - if this widget has not yet been rendered.

    - #### setCancelConfirmMessage

          public void setCancelConfirmMessage(java.lang.String cancelConfirmMessage)

      Confirmation message to show if the user clicks the "Cancel" button and `warnOnCancel` is true. Defaults to "You will lose any work you have done on this data. Proceed anyway?"
      Parameters:
        `cancelConfirmMessage` - . See `String`. Default value is See below

    - #### getCancelConfirmMessage

          public java.lang.String getCancelConfirmMessage()

      Confirmation message to show if the user clicks the "Cancel" button and `warnOnCancel` is true. Defaults to "You will lose any work you have done on this data. Proceed anyway?"
      Returns:
        . See `String`

    - #### getCommitButton

          public IButton getCommitButton()
                                  throws java.lang.IllegalStateException

      Button that commits changes once the user is happy with the data.

      For an overview of how to use and configure AutoChildren, see `Using AutoChildren`.

      Returns:
        IButton
      Throws:
        `java.lang.IllegalStateException` - if this widget has not yet been rendered.

    - #### setCommitConfirmationMessage

          public void setCommitConfirmationMessage(java.lang.String commitConfirmationMessage)
                                            throws java.lang.IllegalStateException

      Message to display after data has been committed, when `showCommitConfirmation` is true.
      Parameters:
        `commitConfirmationMessage` - . See `String`. Default value is "Records added"
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the component has been created

    - #### getCommitConfirmationMessage

          public java.lang.String getCommitConfirmationMessage()

      Message to display after data has been committed, when `showCommitConfirmation` is true.
      Returns:
        . See `String`

    - #### setDataURL

          public void setDataURL(java.lang.String dataURL)

      If set, the batchUploader will copy this value to the queue of "add" requests it sends to the server to actually populate the data. You can use this facility to route the queue to your own server-side logic, for example to add pre- or post-processing.
      Parameters:
        `dataURL` - . See `String`. Default value is null

    - #### getDataURL

          public java.lang.String getDataURL()

      If set, the batchUploader will copy this value to the queue of "add" requests it sends to the server to actually populate the data. You can use this facility to route the queue to your own server-side logic, for example to add pre- or post-processing.
      Returns:
        . See `String`

    - #### setDefaultDelimiter

          public void setDefaultDelimiter(java.lang.String defaultDelimiter)

      The delimiter to use when importing character-delimited files. The default is comma (CSV).
      Parameters:
        `defaultDelimiter` - . See `String`. Default value is ","

    - #### getDefaultDelimiter

          public java.lang.String getDefaultDelimiter()

      The delimiter to use when importing character-delimited files. The default is comma (CSV).
      Returns:
        . See `String`

    - #### setDefaultQuoteString

          public void setDefaultQuoteString(java.lang.String defaultQuoteString)

      The default character used to quote strings.
      Parameters:
        `defaultQuoteString` - . See `String`. Default value is "\""

    - #### getDefaultQuoteString

          public java.lang.String getDefaultQuoteString()

      The default character used to quote strings.
      Returns:
        . See `String`

    - #### getGrid

          public ListGrid getGrid()
                           throws java.lang.IllegalStateException

      Grid which will show a preview of data to be uploaded, with errors flagged

      For an overview of how to use and configure AutoChildren, see `Using AutoChildren`.

      Returns:
        ListGrid
      Throws:
        `java.lang.IllegalStateException` - if this widget has not yet been rendered.

    - #### setPartialCommit

          public void setPartialCommit(PartialCommitOption partialCommit)

      Specifies what action to take if the user attempts to commit a partially validated set of data (ie, one that still contains some errors).
      Parameters:
        `partialCommit` - partialCommit Default value is "prompt"

    - #### getPartialCommit

          public PartialCommitOption getPartialCommit()

      Specifies what action to take if the user attempts to commit a partially validated set of data (ie, one that still contains some errors).
      Returns:
        PartialCommitOption

    - #### setPartialCommitError

          public void setPartialCommitError(java.lang.String partialCommitError)

      If `partialCommit` is set to "prevent", the text to display to the user if they try to commit a dataset containing errors. By default, this text is "There are errors in your data. Please correct all errors before clicking Commit"
      Parameters:
        `partialCommitError` - . See `String`. Default value is See below

    - #### getPartialCommitError

          public java.lang.String getPartialCommitError()

      If `partialCommit` is set to "prevent", the text to display to the user if they try to commit a dataset containing errors. By default, this text is "There are errors in your data. Please correct all errors before clicking Commit"
      Returns:
        . See `String`

    - #### setPartialCommitPrompt

          public void setPartialCommitPrompt(java.lang.String partialCommitPrompt)

      If `partialCommit` is set to "prompt", the text to display to the user in the confirmation dialog. By default, this text is "There are errors in your data so it cannot all be saved. If you proceed, you will lose the records with errors. Click 'OK' to proceed anyway, or 'Cancel' to return to your data"
      Parameters:
        `partialCommitPrompt` - . See `String`. Default value is See below

    - #### getPartialCommitPrompt

          public java.lang.String getPartialCommitPrompt()

      If `partialCommit` is set to "prompt", the text to display to the user in the confirmation dialog. By default, this text is "There are errors in your data so it cannot all be saved. If you proceed, you will lose the records with errors. Click 'OK' to proceed anyway, or 'Cancel' to return to your data"
      Returns:
        . See `String`

    - #### setShowCommitConfirmation

          public void setShowCommitConfirmation(java.lang.Boolean showCommitConfirmation)
                                         throws java.lang.IllegalStateException

      Whether to show the `commit message` after data is successfully committed.
      Parameters:
        `showCommitConfirmation` - showCommitConfirmation Default value is true
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the component has been created

    - #### getShowCommitConfirmation

          public java.lang.Boolean getShowCommitConfirmation()

      Whether to show the `commit message` after data is successfully committed.
      Returns:
        Boolean

    - #### getUploadButton

          public IButton getUploadButton()
                                  throws java.lang.IllegalStateException

      Button that triggers the upload.

      For an overview of how to use and configure AutoChildren, see `Using AutoChildren`.

      Returns:
        IButton
      Throws:
        `java.lang.IllegalStateException` - if this widget has not yet been rendered.

    - #### setUploadButtonTitle

          public void setUploadButtonTitle(java.lang.String uploadButtonTitle)
                                    throws java.lang.IllegalStateException

      Title for the `upload button`.
      Parameters:
        `uploadButtonTitle` - . See `String`. Default value is "Upload"
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the component has been created

    - #### getUploadButtonTitle

          public java.lang.String getUploadButtonTitle()

      Title for the `upload button`.
      Returns:
        . See `String`

    - #### setUploadDataSource

          public void setUploadDataSource(DataSource uploadDataSource)
                                   throws java.lang.IllegalStateException

      DataSource used to save uploaded records. Should have an operation of type "add".

      Be careful to note that this is the DataSource representing your data as it will be persisted to your server. It is completely different from the special "batchUpload" DataSource which is used purely as a medium to upload the raw data to the server in the first place.

      Parameters:
        `uploadDataSource` - uploadDataSource Default value is null
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the component has been created

    - #### getUploadDataSource

          public DataSource getUploadDataSource()

      DataSource used to save uploaded records. Should have an operation of type "add".

      Be careful to note that this is the DataSource representing your data as it will be persisted to your server. It is completely different from the special "batchUpload" DataSource which is used purely as a medium to upload the raw data to the server in the first place.

      Returns:
        DataSource

    - #### setUploadFieldPrefix

          public void setUploadFieldPrefix(java.lang.String uploadFieldPrefix)

      String to prepend to the names of the additional fields specified in `uploadFormFields` before they are stored in the HttpSession on the server. This property provides a basic namespace facility, allowing you to avoid name collisions with existing session attributes.

      Example usage: if you have an additional field called "someDate" and you set uploadFieldPrefix to "myFields_", your additionalFormField will be available as an HttpSession attribute called "myFields_someDate"

      Parameters:
        `uploadFieldPrefix` - . See `String`. Default value is null

    - #### getUploadFieldPrefix

          public java.lang.String getUploadFieldPrefix()

      String to prepend to the names of the additional fields specified in `uploadFormFields` before they are stored in the HttpSession on the server. This property provides a basic namespace facility, allowing you to avoid name collisions with existing session attributes.

      Example usage: if you have an additional field called "someDate" and you set uploadFieldPrefix to "myFields_", your additionalFormField will be available as an HttpSession attribute called "myFields_someDate"

      Returns:
        . See `String`

    - #### setUploadFileLabel

          public void setUploadFileLabel(java.lang.String uploadFileLabel)
                                  throws java.lang.IllegalStateException

      Title to display next to the `FileItem` field where the user enters a filename to upload
      Parameters:
        `uploadFileLabel` - . See `String`. Default value is "Upload File"
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the component has been created

    - #### getUploadFileLabel

          public java.lang.String getUploadFileLabel()

      Title to display next to the `FileItem` field where the user enters a filename to upload
      Returns:
        . See `String`

    - #### getUploadForm

          public DynamicForm getUploadForm()
                                    throws java.lang.IllegalStateException

      Form used to specify file to upload, and any additional fields required.

      For an overview of how to use and configure AutoChildren, see `Using AutoChildren`.

      Returns:
        DynamicForm
      Throws:
        `java.lang.IllegalStateException` - if this widget has not yet been rendered.

    - #### setUploadFormFields

          public void setUploadFormFields(FormItem... uploadFormFields)
                                   throws java.lang.IllegalStateException

      Optional fields for the uploadForm.
      Parameters:
        `uploadFormFields` - uploadFormFields Default value is null
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the component has been created

    - #### getUploadFormFields

          public FormItem[] getUploadFormFields()

      Optional fields for the uploadForm.
      Returns:
        FormItem

    - #### setUploadOperation

          public void setUploadOperation(java.lang.String uploadOperation)
                                  throws java.lang.IllegalStateException

      Optional `operationId` for the "add" operation used to add new records to the `uploadDataSource`.
      Parameters:
        `uploadOperation` - . See `String`. Default value is null
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the component has been created

    - #### getUploadOperation

          public java.lang.String getUploadOperation()

      Optional `operationId` for the "add" operation used to add new records to the `uploadDataSource`.
      Returns:
        . See `String`

    - #### setWarnOnCancel

          public void setWarnOnCancel(java.lang.Boolean warnOnCancel)

      If set, indicates that a warning dialog should be shown when Cancel is clicked, asking the user to confirm that this is really what they want to do. The actual warning message is specified with `cancelConfirmMessage`
      Parameters:
        `warnOnCancel` - warnOnCancel Default value is true

    - #### getWarnOnCancel

          public java.lang.Boolean getWarnOnCancel()

      If set, indicates that a warning dialog should be shown when Cancel is clicked, asking the user to confirm that this is really what they want to do. The actual warning message is specified with `cancelConfirmMessage`
      Returns:
        Boolean

    - #### setDefaultProperties

          public static void setDefaultProperties(BatchUploader batchUploaderProperties)

      Class level method to set the default properties of this class. If set, then all subsequent instances of this class will automatically have the default properties that were set when this method was called. This is a powerful feature that eliminates the need for users to create a separate hierarchy of subclasses that only alter the default properties of this class. Can also be used for skinning / styling purposes.

      Note: This method is intended for setting default attributes only and will effect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead.

      Parameters:
        `batchUploaderProperties` - properties that should be used as new defaults when instances of this class are created

    - #### setUploadFormItems

          public void setUploadFormItems(FormItem... items)
                                  throws java.lang.IllegalStateException

      Synonym of `setUploadFormFields(FormItem...)`.
      Throws:
        `java.lang.IllegalStateException`

    - #### setGridFields

          public void setGridFields(ListGridField... fields)

    - #### getGridFields

          public ListGridField[] getGridFields()

      The ListGrid fields
      Returns:
        the fields

    - #### setRequestProperties

          public void setRequestProperties(java.util.Map params)

      Object containing properties to send with every "add" request this batchUploader sends.
      Parameters:
        `params` -

    - #### getRequestProperties

          public java.util.Map getRequestProperties()

      Object containing properties to send with every "add" request this batchUploader sends.
      Returns:

    - #### setLogicalStructure

          public com.smartgwt.logicalstructure.core.LogicalStructureObject setLogicalStructure(com.smartgwt.logicalstructure.widgets.BatchUploaderLogicalStructure s)

    - #### getLogicalStructure

          public com.smartgwt.logicalstructure.core.LogicalStructureObject getLogicalStructure()

      Specified by:
        `getLogicalStructure` in interface `LogicalStructure`
      Overrides:
        `getLogicalStructure` in class `Canvas`