JumpLoader
Java File Upload Applet

Documentation

Exposed interface (API)

JavaScript clients may use exposed interface in order to manage model and configure view. For example, it is possible to start/stop upload process, show or hide particular GUI elements.

Before using interfaces, it is recommended to read about Java-to-JavaScript communications, at least data type conversions.

Applet implements IJumpLoaderApplet inerface, an entry point for accessing other interfaces and objects:

  • IJSUploader - an uploader (model)
  • UploaderConfig - uploader configurator, simple bean for accessing (reading and writing) uploader settings (such as upload URL, file constraints etc.).
  • IMainView - top level GUI container
  • ViewConfig - GUI configurator, simple bean for accessing (reading and writing) GUI settings (mostly about showing or hiding particular components).
  • AppletConfig - applet configurator, responsible for configuring callbacks and applet appearance.

Please refer to API documentation for a full index of interfaces and classes.

Using configurators

Please note, that each configuration property could be set using applet parameters, read applet configuration section. So, it is not necessary to use JavaScript, if the

Each configuration bean usage is implementation specific. Generally setting property does not affect immediately related objects. For example, invoking UploaderConfig.setMaxFileLength() will not cause removing existing files in upload queue that violate new constraint or any error message popup. Instead, this will be considered on next upload file addition.

Configuring GUI using ViewConfig requires additional effort — it is necessary to call updateView() method of corresponding view object. The view object name is same as property prefix. For example, removing (hiding) local file list view requires following invocations:

applet.getViewConfig().setMainViewFileListViewVisible( false );
applet.getMainView().updateView();

This is because file list view is a property (child) of main view. In turn, file list view has another configurable property — location bar. So, code for removing location bar of file list view:

applet.setFileListViewLocationBarVisible( false );
applet.getMainView().getFileListView().updateView();

Please check demo section source code for more examples on API usage.