AjaxFileUpload Class Reference

Inherits com::webobjects::appserver::WOComponent.

Inherited by AjaxFlexibleFileUpload.

Collaboration diagram for AjaxFileUpload:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 AjaxFileUpload (WOContext context)
void appendToResponse (WOResponse aResponse, WOContext aContext)
String bytesReadSize ()
String cancelingText ()
String cancelText ()
String id ()
boolean isUploadStarted ()
boolean progressBarAfterDone ()
boolean progressBarBeforeStart ()
String progressBarID ()
String requestHandlerKey ()
void setRequestHandlerKey (String requestHandlerKey)
void setUploadProgress (AjaxUploadProgress progress)
String srcUrl ()
String startingText ()
WOActionResults startUpload ()
String startUploadFunctionCall ()
String startUploadName ()
String streamLengthSize ()
boolean synchronizesVariablesWithBindings ()
boolean triggerStartUpload ()
WOActionResults uploadCanceled ()
WOActionResults uploadFailed ()
void uploadFinished ()
String uploadFormID ()
String uploadFrameName ()
String uploadLabel ()
AjaxUploadProgress uploadProgress ()
WOActionResults uploadSucceeded ()
String uploadUrl ()

Protected Attributes

AjaxUploadProgress _progress
boolean _triggerUploadStart
boolean _uploadStarted

Private Attributes

String _id
String _requestHandlerKey

Static Private Attributes

static boolean _requestHandlerRegistered = false


Detailed Description

AjaxFileUpload provides an Ajax wrapper around the file upload process. This works pretty differently than WOFileUpload. The AjaxFileUpload component itself provides its own form and autosubmits when the user selects a file to upload. The upload runs in a hidden iframe, with Ajax updates occurring in the main window. When the final ajax update occurs after the completion of the upload, the appropriate actions fire. This means that if the user navigates away during the upload, no completion/failure/etc notifications will occur.

cancelText the text to display for the cancel link cancelingText the text to display when the progress is being canceled startingText the text to display when the progress is starting startedFunction the javascript function to execute when the progress is started canceledFunction the javascript function to execute when the upload is canceled succeededFunction the javascript function to execute when the upload succeeds failedFunction the javascript function to execute when the upload fails finishedFunction the javascript function to execute when the upload finishes (succeeded, failed, or canceled) finishedAction the action to fire when the upload finishes (cancel, failed, or succeeded) canceledAction the action to fire when the upload is canceled succeededAction the action to fire when the upload succeeded failedAction the action to fire when the upload fails data the NSData that will be bound with the contents of the upload inputStream will be bound to an input stream on the contents of the upload outputStream the output stream to write the contents of the upload to streamToFilePath the path to write the upload to, can be a directory finalFilePath the final file path of the upload (when streamToFilePath is set or keepTempFile = true) filePath the name of the uploaded file allowCancel if true, the cancel link is visible progressBarBeforeStart if true, the progress bar is visible before the upload is started progressBarAfterDone if true, the progress bar is visible after the upload is done refreshTime the number of milliseconds to wait between refreshes keepTempFile if true, don't delete the temp file that AjaxFileUpload creates uploadLabel the label to display on the Upload button ("Upload" by default) uploadFunctionName the upload button will instead be a function with the given name progressOfText the text to display for the word "of" in the "[size] of [totalsize]" string during upload mimeType set from the content-type of the upload header if available class the class attribute of the file input style the style attribute of the file input id the id attribute of the file input onFileSelected optional JS code that is called when the file selection changes. To auto-start the upload when a file is selected, set uploadFunctionName to e.g. "startUpload" and onFileSelected to "startUpload()" uploadProgress access to the underlying AjaxUploadProgress object

Author:
mschrag

Constructor & Destructor Documentation

AjaxFileUpload ( WOContext  context  ) 


Member Function Documentation

void appendToResponse ( WOResponse  aResponse,
WOContext  aContext 
)

Reimplemented in AjaxFlexibleFileUpload.

String bytesReadSize (  ) 

String cancelingText (  ) 

String cancelText (  ) 

String id (  ) 

boolean isUploadStarted (  ) 

boolean progressBarAfterDone (  ) 

boolean progressBarBeforeStart (  ) 

String progressBarID (  ) 

String requestHandlerKey (  ) 

void setRequestHandlerKey ( String  requestHandlerKey  ) 

void setUploadProgress ( AjaxUploadProgress  progress  ) 

String srcUrl (  ) 

String startingText (  ) 

WOActionResults startUpload (  ) 

String startUploadFunctionCall (  ) 

String startUploadName (  ) 

String streamLengthSize (  ) 

boolean synchronizesVariablesWithBindings (  ) 

boolean triggerStartUpload (  ) 

WOActionResults uploadCanceled (  ) 

Reimplemented in AjaxFlexibleFileUpload.

WOActionResults uploadFailed (  ) 

Reimplemented in AjaxFlexibleFileUpload.

void uploadFinished (  ) 

String uploadFormID (  ) 

String uploadFrameName (  ) 

String uploadLabel (  ) 

Reimplemented in AjaxFlexibleFileUpload.

AjaxUploadProgress uploadProgress (  ) 

Reimplemented in AjaxFlexibleFileUpload.

WOActionResults uploadSucceeded (  ) 

Reimplemented in AjaxFlexibleFileUpload.

String uploadUrl (  ) 


Member Data Documentation

String _id [private]

boolean _requestHandlerRegistered = false [static, private]

boolean _triggerUploadStart [protected]

boolean _uploadStarted [protected]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:42:38 2012 for Project Wonder by  doxygen 1.5.8