Class FileUploadEditor

  • All Implemented Interfaces:
    com.google.gwt.editor.client.Editor<String>, com.google.gwt.editor.client.HasEditorErrors<String>, com.google.gwt.editor.client.LeafValueEditor<String>, com.google.gwt.user.client.TakesValue<String>, com.google.gwt.user.client.ui.IsWidget, LeafAttributeEditor<String>

    @Dependent
    public class FileUploadEditor
    extends Object
    implements com.google.gwt.user.client.ui.IsWidget, LeafAttributeEditor<String>

    Presenter for editor component that wraps a gwt bootstrap file upload component an additionally provides:

    • Error messages - Show validation error messages.
    • Dashbuilder File Upload Servlet integration - It uses the UF Dashbuilder servlet for uploading files and provides a listener to obtain the uploaded file path.
    Since:
    0.4.0
    • Constructor Detail

      • FileUploadEditor

        @Inject
        public FileUploadEditor​(javax.enterprise.event.Event<ValueChangeEvent<String>> valueChangeEvent,
                                javax.enterprise.event.Event<org.uberfire.workbench.events.NotificationEvent> workbenchNotification,
                                FileUploadEditor.View view)
    • Method Detail

      • addHelpContent

        public void addHelpContent​(String title,
                                   String content,
                                   org.gwtbootstrap3.client.ui.constants.Placement placement)
      • showErrors

        public void showErrors​(List<com.google.gwt.editor.client.EditorError> errors)
        Specified by:
        showErrors in interface com.google.gwt.editor.client.HasEditorErrors<String>
      • asWidget

        public com.google.gwt.user.client.ui.Widget asWidget()
        Specified by:
        asWidget in interface com.google.gwt.user.client.ui.IsWidget
      • setValue

        public void setValue​(String value)
        Specified by:
        setValue in interface com.google.gwt.user.client.TakesValue<String>
      • getValue

        public String getValue()
        Specified by:
        getValue in interface com.google.gwt.user.client.TakesValue<String>
      • setAccept

        public void setAccept​(String type)