Enabling File Browsing for a Custom Protocol Handler
To allow users to insert images more easily, the Oxygen XML Web Author Component provides a file browsing JavaScript widget that can be used for any custom protocol plugin. To enable this widget, follow these steps:
- Develop a plugin that implements the ro.sync.exml.plugin.urlstreamhandler.URLStreamHandlerPluginExtensioninterface. ThegetURLStreamHandlermethod should return an instance ofjava.net.URLStreamHandler(for example,myHandler).
- myHandler.openConnection()should open an instance of the- ro.sync.net.protocol.FileBrowsingConnectioninterface.
- On the client-side, register the sync.api.FileBrowsingDialogwidget as aUrlChooserusing the following code snippet:workspace.setUrlChooser(new sync.api.FileBrowsingDialog()); 
