|
JavaPowUpload 2.2
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
onAddFiles 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 cannot be run under JRE version < 1.5.0.
String current_jre_version - Java Runtime Environment under which 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 is 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 the upload mode) object.
boolean newStatus - True if the checkbox is checked; otherwise false.
onTargetPathChanged
event onTargetPathChanged(String newPath) {}
Invoked after a user selects a new destination folder. Invoked only when JavaPowUpload works in the download mode.
String newPath - selected destination folder.
onAddFile
event onAddFile(DownloadItem di) {}
Upload mode: Invoked after a user adds new files.
Download mode: Invoked after files has been added using addFile() method.
DownloadItem di - Instance of the DownloadItem (UploadItem in upload mode) object.
onAddFiles
event onAddFiles(UploadItem[] files) {}
Upload mode: Invoked after a user adds new files.
Download mode: Invoked after files has been added using addFile() method.
UploadItem[] files - Array of of instances of the DownloadItem (UploadItem in upload mode) objects.
function JavaPowUpload_onAddFiles(files)
{
alert(files.length+" files added");
for(var i=0; i < files.length; i++)
alert("added file "+files[i].getFileName());
}
onRemoveFile
event onRemoveFile(DownloadItem di) {}
Invoked after a user removes a file from the tree.
DownloadItem di - Instance of the DownloadItem (UploadItem in the upload mode) object.
function JavaPowUpload_onRemoveFile(downloadItem)
{
alert("Remove file: "+downloadItem.getFullPath());
}
onDownloadStart
event onDownloadStart() {}
Invoked after the download process has been started.
onDownloadFinish
event onDownloadFinish() {}
Invoked after the download process has been finished.
function JavaPowUpload_onDownloadFinish()
{
alert("Download process complete");
}
onDownloadStopped
event onDownloadStopped() {}
Invoked after the download process has been stopped by a user.
function JavaPowUpload_onDownloadStopped()
{
alert("Download process stopped ");
}
onUploadStart
event onUploadStart() {}
Invoked after the upload process has been started.
onUploadFinish
event onUploadFinish() {}
Invoked after the upload process has been finished.
function JavaPowUpload_onUploadFinish()
{
alert("Download upload complete");
}
onUploadStopped
event onUploadStopped() {}
Invoked after the upload process has been stopped by a user.
function JavaPowUpload_onUploadStopped()
{
alert("Upload process stopped ");
}
onPrepareRequest
event onPrepareRequest(UploadItem[] files) {}
Fired in the HTTP upload mode when a request is prepared, right before the upload has been started.
UploadItem[] files - Array of the UploadItem objects which will be posted in a request.
function JavaPowUpload_onPrepareRequest(files)
{
alert("request prepaired, starting upload");
}
onServerResponse
event onServerResponse(int statusCode, String response, UploadItem[] files) {}
Occurs after JavaPowUpload receives the HTTP response from server.
int statusCode - HTTP code of server reply.
String response - Server reply as a string.
UploadItem[] files - Array of the UploadItem objects which will be posted in a request.
function JavaPowUpload_onServerResponse(status, response)
{
alert("Server response: ("+status+") "+response);
}
onFileStart
event onFileStart(DownloadItem di) {}
Invoked after download/upload process of the next file is started.
DownloadItem di - Instance of the source DownloadItem (UploadItem in the 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 an individual item.
Common.ItemProgressEventTimeout parameter is used to delay the occurrence of this event.
DownloadItem di - Instance of the source DownloadItem (UploadItem in the 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 the download/upload process of the individual item has been finished.
DownloadItem di - Instance of the source DownloadItem (UploadItem in the upload mode) object.
function JavaPowUpload_onFileFinished(downloadItem)
{
alert("File complete: "+downloadItem.getFilename());
}
onFileStopped
event onFileStopped(DownloadItem di) {}
Invoked when download/upload process of an individual item has been stopped by a user.
DownloadItem di - Instance of the source DownloadItem (UploadItem in the 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 uncompressing process of the DownloadItem di has been started.
DownloadItem di - Instance of the source DownloadItem (UploadItem in the upload mode) object.
String targetPath - Path where the archive will be unpacked.
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 uncompressing process of the next entry in the zip archive has been started.
DownloadItem di - Instance of the source DownloadItem (UploadItem in the upload mode) object.
String fileName - File name of the archive.
String outPutFileName - Path where the current archive will be extracted.
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 extracting process of the DownloadItem di has been finished.
DownloadItem di - Instance of the source DownloadItem (UploadItem in the upload mode) object.
function JavaPowUpload_onFileUncompressFinished(downloadItem)
{
alert("Finish uncompressing file "+downloadItem.getFilename());
}
onFileUncompressStopped
event onFileUncompressStopped(DownloadItem di) {}
Invoked when the extracting process of the DownloadItem di has been stopped by a user.
DownloadItem di - Instance of the source DownloadItem (UploadItem in the upload mode) object.
function JavaPowUpload_onFileUncompressStopped(downloadItem)
{
alert("Stop uncompressing file "+downloadItem.getFilename());
}
onError
event onError(String errorMessage) {}
Invoked if an error occurs.
String errorMessage - Error message from JavaPowUpload.
function JavaPowUpload_onError(errorMessage)
{
alert(errorMessage);
}