For more information on how to use JavaPowUpload events see How to section.
In the list below there are all available JavaPowUpload events.
JavaPowUpload object events
onOldJreVersion event
onEventListenerRemoved event
onEventListenerInitialized event
onAppletInit event
onCheckedChanged event
onTargetPathChanged event
onAddFile event
onRemoveFile event
onDownloadStart event
onDownloadFinish event
onDownloadStopped event
onUploadStart event
onUploadFinish event
onUploadStopped event
onServerResponse event
onFileStart event
onFileProgress event
onFileFinished event
onFileStopped event
onFileUncompressStart event
onFileUncompressProgress event
onFileUncompressFinished event
onFileUncompressStopped event
event onOldJreVersion(String current_jre_version) {}
Occurs when JavaPowUpload executes 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)
;
}
event onEventListenerRemoved() {}
Invoked when LiveConnect removed from listeners collection.
function JavaPowUpload_onEventListenerRemoved()
{
alert("LiveConnect removed from listeners collection.");
}
event onEventListenerInitialized() {}
Invoked when LiveConnect initialized and added to listeners collection.
function JavaPowUpload_onEventListenerInitialized()
{
alert("LiveConnect initialized and added to listeners collection.");
}
event onAppletInit() {}
Invoked after JavaPowUpload applet initialized and ready to work.
function JavaPowUpload_onAppletInit()
{
alert("JavaPowUpload started");
}
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.
event onTargetPathChanged(String newPath) {}
Invoked after user selects new destination folder. Invoked only when JavaPowUpload works in download mode.
String newPath
- Destination folder selected.
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.
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());
}
event onDownloadStart() {}
Invoked after download process started.
event onDownloadFinish() {}
Invoked after download process finished.
function JavaPowUpload_onDownloadFinish()
{
alert("Download process complete");
}
event onDownloadStopped() {}
Invoked after download process stopped by user.
function JavaPowUpload_onDownloadStopped()
{
alert("Download process stopped ");
}
event onUploadStart() {}
Invoked after upload process started.
event onUploadFinish() {}
Invoked after upload process finished.
function JavaPowUpload_onUploadFinish()
{
alert("Download upload complete");
}
event onUploadStopped() {}
Invoked after upload process stopped by user.
function JavaPowUpload_onUploadStopped()
{
alert("Upload process stopped ");
}
event onServerResponse(int statusCode, String response) {}
Occurs after JavaPowUpload receives HTTP response from server.
int statusCode
- HTTP code of server reply.
String response
- Server reply as a string.
function JavaPowUpload_onServerResponse(status, response)
{
alert("Server response: ("+status+") "+response);
}
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());
}
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");
}
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());
}
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());
}
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);
}
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)");
}
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());
}
event onFileUncompressStopped(DownloadItem di) {}
Invoked after extract process of DownloadItem di stopped by user.
DownloadItem di
- Instance of source DownloadItem (UploadItem in upload mode) object.
function JavaPowUpload_onFileUncompressStopped(downloadItem)
{
alert("Stop uncompressing file "+downloadItem.getFilename());
}