Edit online

Enabling File Browsing for a Custom File Storage System

Some editing actions require the users to browse for a resource located in the file storage. For example, when inserting an image or when creating a cross-reference. To provide a widget that allows users to browse your file storage, you have two options:

Using the default File Browser

Oxygen XML Web Author provides a file browsing JavaScript widget that can be used for any custom protocol plugin. To enable this widget, follow these steps:
  1. If you do have one already, develop a plugin that implements the ro.sync.exml.plugin.urlstreamhandler.URLStreamHandlerPluginExtension interface. The getURLStreamHandler method should return an instance of java.net.URLStreamHandler (for example, myHandler).
  2. myHandler.openConnection()should open an instance of the ro.sync.net.protocol.FileBrowsingConnection interface.
  3. On the client-side, register the sync.api.FileBrowsingDialog widget as a sync.api.UrlChooser using the following code snippet:
    workspace.setUrlChooser(new sync.api.FileBrowsingDialog());

Using a Custom JavaScript Widget

Some file storage systems have their own file browsing widget which is more tightly integrated. For example, it has full-text or metadata-based search functionality. To use it in Oxygen XML Web Author, you can follow this tutorial.