public abstract class AbstractFileUploadWizardStep extends AbstractInteractiveWizardStep
| Modifier and Type | Field and Description |
|---|---|
protected static String |
FIELD_ERROR_STYLE
The style of the fields under error.
|
protected static String |
FIELD_HINT_STYLE
The style used on the field hint.
|
protected static String |
FIELD_LABEL_STYLE
The style used on the field label.
|
| Constructor and Description |
|---|
AbstractFileUploadWizardStep(WikiServiceAsync wikiService)
Creates a new file upload wizard step that uses the given service to get information about the uploaded files.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
displayError(String errorMessage)
Displays the error message and markers for this dialog.
|
protected String |
extractFileName() |
String |
getFileHelpLabel() |
protected String |
getFileLabel() |
protected com.google.gwt.user.client.ui.FileUpload |
getFileUploadInput() |
protected String |
getFileUploadInputName() |
protected abstract WikiPageReference |
getTargetPageReference() |
protected void |
getUploadURL(com.google.gwt.user.client.rpc.AsyncCallback<String> cb)
Requests the upload URL from the server.
|
protected void |
hideError()
Hides the error message and markers for this dialog.
|
void |
init(Object data,
com.google.gwt.user.client.rpc.AsyncCallback<?> cb) |
protected abstract void |
onAttachmentUploaded(Attachment attach,
com.google.gwt.user.client.rpc.AsyncCallback<Boolean> async)
Notifies the successful completion of a file upload, to be overridden by subclasses to provide specific behavior.
|
void |
onCancel() |
void |
onSubmit(com.google.gwt.user.client.rpc.AsyncCallback<Boolean> async) |
protected void |
onSubmitComplete(com.google.gwt.user.client.ui.FormPanel.SubmitCompleteEvent event,
com.google.gwt.user.client.rpc.AsyncCallback<Boolean> async)
Handles the submit completion in asynchronous mode, to pass the result of processing the result in the received
callback.
|
void |
setFileHelpLabel(String fileHelpLabelText)
Sets the help label for the file input.
|
display, getStepTitle, isAutoSubmit, setStepTitlegetDirectionName, getNextStep, getValidDirections, setDirectionName, setNextStep, setValidDirectionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetResultprotected static final String FIELD_ERROR_STYLE
protected static final String FIELD_LABEL_STYLE
protected static final String FIELD_HINT_STYLE
public AbstractFileUploadWizardStep(WikiServiceAsync wikiService)
wikiService - the service used to access the uploaded attachmentsprotected String getFileLabel()
public String getFileHelpLabel()
public void setFileHelpLabel(String fileHelpLabelText)
fileHelpLabelText - the new help label text for the file inputprotected void getUploadURL(com.google.gwt.user.client.rpc.AsyncCallback<String> cb)
cb - the object to be notified when the upload URL is receivedprotected String getFileUploadInputName()
name attribute of the fileUploadInput, to be returned by subclasses implementing
#getUploadURL() to set the file upload form datapublic void init(Object data, com.google.gwt.user.client.rpc.AsyncCallback<?> cb)
public void onCancel()
WizardStep.onCancel()public void onSubmit(com.google.gwt.user.client.rpc.AsyncCallback<Boolean> async)
WizardStep.onSubmit(AsyncCallback)protected void onSubmitComplete(com.google.gwt.user.client.ui.FormPanel.SubmitCompleteEvent event,
com.google.gwt.user.client.rpc.AsyncCallback<Boolean> async)
event - the original FormPanel.SubmitCompleteEventasync - the callback used to send back the response of form event processing#onSubmit}protected abstract void onAttachmentUploaded(Attachment attach, com.google.gwt.user.client.rpc.AsyncCallback<Boolean> async)
attach - the successfully uploaded attachmentasync - the call-back used to indicate the completion of this method. It's required that the sub-classes
invoke async.onSuccess(true); method once they are done with processing the attachment. Without this
method being invoked, the submission of this wizard step will not complete.protected abstract WikiPageReference getTargetPageReference()
protected String extractFileName()
protected com.google.gwt.user.client.ui.FileUpload getFileUploadInput()
protected void displayError(String errorMessage)
errorMessage - the error message to display.protected void hideError()
Copyright © 2004–2015 XWiki. All rights reserved.