Class CmsUgcWrapper

  • All Implemented Interfaces:,,,,,,,,,,, java.lang.Iterable<>

    public class CmsUgcWrapper
    Widget used to wrap and manage the state of forms for which the form editing API is used.

    • Nested Class Summary

      • Nested classes/interfaces inherited from class,,,
      • Nested classes/interfaces inherited from class,
      • Nested classes/interfaces inherited from interface
    • Field Summary

      • Fields inherited from class

      • Fields inherited from class

    • Constructor Summary

      Constructor Description
      CmsUgcWrapper​( element, java.lang.String formSessionId)
      Wraps an existing form element with this widget.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isFileField​( elem)
      Checks if a form field is a file input field.
      void setFormSession​(CmsClientUgcSession session)
      Sets the form session.
      void uploadFields​(java.util.Set<java.lang.String> fields,<java.util.Map<java.lang.String,​java.lang.String>,​java.lang.Void> filenameCallback, I_CmsErrorCallback errorCallback)
      Uploads files from the given file input fields.
      • Methods inherited from class

        addFormHandler, addSubmitCompleteHandler, addSubmitHandler, getAction, getEncoding, getMethod, getTarget, onAttach, onDetach, onFormSubmit, onFrameLoad, removeFormHandler, reset, setAction, setAction, setEncoding, setMethod, submit, wrap, wrap
      • Methods inherited from class

        add, getContainerElement, getWidget, iterator, remove, setWidget, setWidget
      • Methods inherited from class

        add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
      • Methods inherited from class

        addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
      • Methods inherited from class

        addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, 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
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • CmsUgcWrapper

        public CmsUgcWrapper​( element,
                             java.lang.String formSessionId)
        Wraps an existing form element with this widget.

        element - the form element to wrap
        formSessionId - the form session id
    • Method Detail

      • isFileField

        public static boolean isFileField​( elem)
        Checks if a form field is a file input field.

        elem - the form field to check
        true if the given field is a file input field
      • uploadFields

        public void uploadFields​(java.util.Set<java.lang.String> fields,
                       <java.util.Map<java.lang.String,​java.lang.String>,​java.lang.Void> filenameCallback,
                                 I_CmsErrorCallback errorCallback)
        Uploads files from the given file input fields.
        fields - the set of names of fields containing the files to upload
        filenameCallback - the callback to call with the resulting map from field names to file paths
        errorCallback - the callback to call with an error message