|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xpn.xwiki.wysiwyg.client.widget.wizard.util.AbstractFileUploadWizardStep
public abstract class AbstractFileUploadWizardStep
Wizard step to handle the upload of a file to a wiki page: display the file input and upload on finish.
| Field Summary | |
|---|---|
protected static java.lang.String |
FIELD_ERROR_STYLE
The style of the fields under error. |
| Constructor Summary | |
|---|---|
AbstractFileUploadWizardStep()
Default constructor. |
|
| Method Summary | |
|---|---|
com.google.gwt.user.client.ui.Widget |
display()
|
protected void |
displayError(java.lang.String errorMessage)
Displays the error message and markers for this dialog. |
protected java.lang.String |
extractFileName()
|
java.lang.String |
getDirectionName(NavigationListener.NavigationDirection direction)
|
protected abstract java.lang.String |
getFileHelpLabel()
|
protected java.lang.String |
getFileLabel()
|
protected com.google.gwt.user.client.ui.FileUpload |
getFileUploadInput()
|
protected java.lang.String |
getFileUploadInputName()
|
protected com.google.gwt.user.client.ui.Panel |
getMainPanel()
Method for retrieving the main UI (panel) by sub-classes so that they can customize it. |
protected abstract java.lang.String |
getPage()
|
protected abstract java.lang.String |
getSpace()
|
java.lang.String |
getStepTitle()
|
protected java.lang.String |
getUploadURL()
Builds the form upload URL for this form, to be called before form submission. |
java.util.EnumSet<NavigationListener.NavigationDirection> |
getValidDirections()
|
protected abstract java.lang.String |
getWiki()
|
protected void |
hideError()
Hides the error message and markers for this dialog. |
void |
init(java.lang.Object data,
com.google.gwt.user.client.rpc.AsyncCallback<?> cb)
|
protected abstract void |
onAttachmentUploaded(Attachment attach,
com.google.gwt.user.client.rpc.AsyncCallback<java.lang.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<java.lang.Boolean> async)
|
protected void |
onSubmitComplete(com.google.gwt.user.client.ui.FormPanel.SubmitCompleteEvent event,
com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Boolean> async)
Handles the submit completion in asynchronous mode, to pass the result of processing the result in the received callback. |
void |
setWikiService(WikiServiceAsync wikiService)
Inject the wiki service. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.xwiki.gwt.user.client.ui.wizard.WizardStep |
|---|
getNextStep, getResult |
| Field Detail |
|---|
protected static final java.lang.String FIELD_ERROR_STYLE
| Constructor Detail |
|---|
public AbstractFileUploadWizardStep()
| Method Detail |
|---|
protected java.lang.String getFileLabel()
protected abstract java.lang.String getFileHelpLabel()
protected java.lang.String getUploadURL()
protected java.lang.String getFileUploadInputName()
name attribute of the fileUploadInput, to be returned by subclasses implementing
getUploadURL() to set the file upload form data.
public void init(java.lang.Object data,
com.google.gwt.user.client.rpc.AsyncCallback<?> cb)
init in interface WizardSteppublic com.google.gwt.user.client.ui.Widget display()
display in interface WizardSteppublic java.lang.String getDirectionName(NavigationListener.NavigationDirection direction)
getDirectionName in interface WizardSteppublic java.lang.String getStepTitle()
getStepTitle in interface WizardSteppublic java.util.EnumSet<NavigationListener.NavigationDirection> getValidDirections()
getValidDirections in interface WizardSteppublic void onCancel()
onCancel in interface WizardStepWizardStep.onCancel()public void onSubmit(com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Boolean> async)
onSubmit in interface WizardStepWizardStep.onSubmit(AsyncCallback)
protected void onSubmitComplete(com.google.gwt.user.client.ui.FormPanel.SubmitCompleteEvent event,
com.google.gwt.user.client.rpc.AsyncCallback<java.lang.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<java.lang.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 java.lang.String getWiki()
protected abstract java.lang.String getSpace()
protected abstract java.lang.String getPage()
protected java.lang.String extractFileName()
protected com.google.gwt.user.client.ui.Panel getMainPanel()
protected com.google.gwt.user.client.ui.FileUpload getFileUploadInput()
protected void displayError(java.lang.String errorMessage)
errorMessage - the error message to display.protected void hideError()
public void setWikiService(WikiServiceAsync wikiService)
wikiService - the service used to access the uploaded attachments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||