|
JavaPowUpload 2.0
Events |
Home
page Contact
support
|
JavaPowUpload events
For more information on how to use JavaPowUpload events see How to section.
In the list below there are all available JavaPowUpload events.
onOldJreVersion event
onEventListenerRemoved event
onEventListenerInitialized event
onAppletInit event
onFileListLoaded event
onCheckedChanged event
onTargetPathChanged event
onAddFile event
onRemoveFile event
onDownloadStart event
onDownloadFinish event
onDownloadStopped event
onUploadStart event
onUploadFinish event
onUploadStopped event
onPrepareRequest event
onServerResponse event
onFileStart event
onFileProgress event
onFileFinished event
onFileStopped event
onFileUncompressStart event
onFileUncompressProgress event
onFileUncompressFinished event
onFileUncompressStopped event
onError event
onOldJreVersion
event onOldJreVersion(String current_jre_version) {}
Occurs when JavaPowUpload executes under JRE version < 1.5.0.
Depricated: JavaPowUpload since 1.1.1 version compiled under 1.5 JDK and can not be run under JRE version < 1.5.0.
String current_jre_version - Java Runtime Environment under wich JavaPowUpload was started.
function JavaPowUpload_onOldJreVersion(currentVersion)
{
alert("JavaPowUpload require JRE version > 1.5.0. Version of your JRE is:"+currentVersion)
;
}
onEventListenerRemoved
event onEventListenerRemoved() {}
Invoked when LiveConnect removed from listeners collection.
function JavaPowUpload_onEventListenerRemoved()
{
alert("LiveConnect removed from listeners collection.");
}
onEventListenerInitialized
event onEventListenerInitialized() {}
Invoked when LiveConnect initialized and added to listeners collection.
function JavaPowUpload_onEventListenerInitialized()
{
alert("LiveConnect initialized and added to listeners collection.");
}
onAppletInit
event onAppletInit() {}
Invoked after JavaPowUpload applet initialized and ready to work.
function JavaPowUpload_onAppletInit()
{
alert("JavaPowUpload started");
}
onFileListLoaded
event onFileListLoaded() {}
Invoked after file list was successfully loaded.
function JavaPowUpload_onFileListLoaded()
{
alert("file list loaded");
}
onCheckedChanged
event onCheckedChanged(DownloadItem di, boolean newStatus) {}
Invoked after status of any item's checkbox is changed.
DownloadItem di - Instance of source DownloadItem (UploadItem in upload mode) object.
boolean newStatus - True if checkbox checked; otherwise false.
onTargetPathChanged
event onTargetPathChanged(String newPath) {}
Invoked after user selects new destination folder. Invoked only when JavaPowUpload works in download mode.
String newPath - Destination folder selected.
onAddFile
event onAddFile(DownloadItem di) {}
Upload mode: Invoked after user adds new files.
Download mode: Invoked after files added using addFile() method.
DownloadItem di - Instance of DownloadItem (UploadItem in upload mode) object.
onRemoveFile
event onRemoveFile(DownloadItem di) {}
Invoked after user removes file from tree.
DownloadItem di - Instance of DownloadItem (UploadItem in upload mode) object.
function JavaPowUpload_onRemoveFile(downloadItem)
{
alert("Remove file: "+downloadItem.getFullPath());
}
onDownloadStart
event onDownloadStart() {}
Invoked after download process started.
onDownloadFinish
event onDownloadFinish() {}
Invoked after download process finished.
function JavaPowUpload_onDownloadFinish()
{
alert("Download process complete");
}
onDownloadStopped
event onDownloadStopped() {}
Invoked after download process stopped by user.
function JavaPowUpload_onDownloadStopped()
{
alert("Download process stopped ");
}
onUploadStart
event onUploadStart() {}
Invoked after upload process started.
onUploadFinish
event onUploadFinish() {}
Invoked after upload process finished.
function JavaPowUpload_onUploadFinish()
{
alert("Download upload complete");
}
onUploadStopped
event onUploadStopped() {}
Invoked after upload process stopped by user.
function JavaPowUpload_onUploadStopped()
{
alert("Upload process stopped ");
}
onPrepareRequest
event onPrepareRequest(UploadItem[] files) {}
Fired in HTTP upload mode when request is prepared, right before upload starts.
UploadItem[] files - Array of UploadItem objects wich will be posted in request.
function JavaPowUpload_onPrepareRequest(files)
{
alert("request prepaired, starting upload");
}
onServerResponse
event onServerResponse(int statusCode, String response, UploadItem[] files) {}
Occurs after JavaPowUpload receives HTTP response from server.
int statusCode - HTTP code of server reply.
String response - Server reply as a string.
UploadItem[] files - Array of UploadItem objects wich posted in request.
function JavaPowUpload_onServerResponse(status, response)
{
alert("Server response: ("+status+") "+response);
}
onFileStart
event onFileStart(DownloadItem di) {}
Invoked after download/upload process of next file started.
DownloadItem di - Instance of source DownloadItem (UploadItem in upload mode) object.
function JavaPowUpload_onFileStart(downloadItem)
{
alert("Starting file: "+downloadItem.getFilename());
}
onFileProgress
event onFileProgress(DownloadItem di) {}
Invoked periodically during the upload/download process of individual item.
Parameter Common.ItemProgressEventTimeout used to delay occurence of this event.
DownloadItem di - Instance of source DownloadItem (UploadItem in upload mode) object.
function JavaPowUpload_onFileProgress(downloadItem)
{
alert("File progress: file name: "+downloadItem.getFilename()+"; progress: "+JavaPowUpload.getProgressInfo().getCurrentFilePercent()+
"% - "+JavaPowUpload.getProgressInfo().getCurrentFileBytesRead()+
" of "+JavaPowUpload.getProgressInfo().getCurrentFileTotalSize()+" bytes proceed");
}
onFileFinished
event onFileFinished(DownloadItem di) {}
Invoked after download/upload process of individual item finished.
DownloadItem di - Instance of source DownloadItem (UploadItem in upload mode) object.
function JavaPowUpload_onFileFinished(downloadItem)
{
alert("File complete: "+downloadItem.getFilename());
}
onFileStopped
event onFileStopped(DownloadItem di) {}
Invoked when download/upload process of individual item stopped by user.
DownloadItem di - Instance of source DownloadItem (UploadItem in upload mode) object.
function JavaPowUpload_onFileStopped(downloadItem)
{
alert("User stop downlod/upload of file"+downloadItem.getFullPath());
}
onFileUncompressStart
event onFileUncompressStart(DownloadItem di, String targetPath) {}
Invoked when uncompress process of DownloadItem di started.
DownloadItem di - Instance of source DownloadItem (UploadItem in upload mode) object.
String targetPath - Path, wich will be unpacked archive.
function JavaPowUpload_onFileUncompressStart(downloadItem, targetPath)
{
alert("Start uncompressing file "+downloadItem.getFilename()+" to "+targetPath);
}
onFileUncompressProgress
event onFileUncompressProgress(DownloadItem di, String fileName, String outPutFileName, long percentDone, long extractedBytes, long totalBytes) {}
Invoked after uncompress process of next entry in zip archive started.
DownloadItem di - Instance of source DownloadItem (UploadItem in upload mode) object.
String fileName - File name of archive.
String outPutFileName - Path, where will be extracted current archive.
long percentDone - Percent completed.
long extractedBytes - Count of already extracted bytes.
long totalBytes - Total bytes to extract.
function JavaPowUpload_onFileUncompressProgress(downloadItem, entryName, targetFile, percent, currentBytes, totalBytes)
{
alert("Uncompressing archive("+downloadItem.getFilename()+"): current entry-"+entryName+", saving to file-"+targetFile+
", percent - "+percent+" ("+currentBytes+" of "+totalBytes+" bytes)");
}
onFileUncompressFinished
event onFileUncompressFinished(DownloadItem di) {}
Invoked after extract process of DownloadItem di finished.
DownloadItem di - Instance of source DownloadItem (UploadItem in upload mode) object.
function JavaPowUpload_onFileUncompressFinished(downloadItem)
{
alert("Finish uncompressing file "+downloadItem.getFilename());
}
onFileUncompressStopped
event onFileUncompressStopped(DownloadItem di) {}
Invoked when extract process of DownloadItem di was stopped by user.
DownloadItem di - Instance of source DownloadItem (UploadItem in upload mode) object.
function JavaPowUpload_onFileUncompressStopped(downloadItem)
{
alert("Stop uncompressing file "+downloadItem.getFilename());
}
onError
event onError(String errorMessage) {}
Invoked if some an error occured.
String errorMessage - Error message from JavaPowUpload.
function JavaPowUpload_onError(errorMessage)
{
alert(errorMessage);
}