Class FileUploadEditor
- java.lang.Object
-
- org.dashbuilder.common.client.editor.file.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceFileUploadEditor.FileUploadEditorCallbackstatic interfaceFileUploadEditor.View
-
Field Summary
Fields Modifier and Type Field Description FileUploadEditor.Viewview
-
Constructor Summary
Constructors Constructor Description FileUploadEditor(javax.enterprise.event.Event<ValueChangeEvent<String>> valueChangeEvent, javax.enterprise.event.Event<org.uberfire.workbench.events.NotificationEvent> workbenchNotification, FileUploadEditor.View view)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddHelpContent(String title, String content, org.gwtbootstrap3.client.ui.constants.Placement placement)com.google.gwt.user.client.ui.WidgetasWidget()voidconfigure(String fileUploadName, FileUploadEditor.FileUploadEditorCallback callback)StringgetValue()voidinit()voidsetAccept(String type)voidsetValue(String value)voidshowErrors(List<com.google.gwt.editor.client.EditorError> errors)
-
-
-
Field Detail
-
view
public FileUploadEditor.View view
-
-
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
-
init
@PostConstruct public void init()
-
configure
public void configure(String fileUploadName, FileUploadEditor.FileUploadEditorCallback callback)
-
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:
showErrorsin interfacecom.google.gwt.editor.client.HasEditorErrors<String>
-
asWidget
public com.google.gwt.user.client.ui.Widget asWidget()
- Specified by:
asWidgetin interfacecom.google.gwt.user.client.ui.IsWidget
-
setValue
public void setValue(String value)
- Specified by:
setValuein interfacecom.google.gwt.user.client.TakesValue<String>
-
getValue
public String getValue()
- Specified by:
getValuein interfacecom.google.gwt.user.client.TakesValue<String>
-
setAccept
public void setAccept(String type)
-
-