Sparkplug BrowserViewer Documentation

Hi,

I am trying to learn more about the org.jivesoftware.spark.component.browser package in the Sparkplug Kit 1.1.0. Unfortunately, the Javadocs for this package are very terse and do not answer the following questions that I have:

  1. The org.jivesoftware.spark.component.browser.BrowserFactory.getBrowser() method returns a BrowserViewer. According to the Javadocs, this BrowserViewer is some kind of default browser for the environment that the Spark client runs in. How do I set up a default browser (in my case Firefox) for a Spark client/Spark plugin? If I can’'t set up a default browser, how does the Spark client/Spark plugin know which browser to choose?

  2. What exactly are the semantics of the getBrowser() method? My Spark plugin is able to call this method without getting any exception but nothing seems to happen as a consequence of it. Should there be some visible effect to calling this method such as a Spark window popping up with a browser interface in it? Or an external browser process starting up?

  3. The BrowserViewer returned by the BrowserFactory has a loadURL(java.lang.String url) method. When my Spark plugin calls this method, nothing seems to happen - neither an exception nor anything else that I was able to observe. Can anybody tell me why calling this method doesn’'t have any effect?

Any hint/help (including “you missed something obvious here…”) is greatly appreciated. Thank you,

Reinhard

Hi Reinhard,

I’'m not entirely what the org.jivesoftware.spark.component.browser package is for either. ?:expressionless:

However, try using BrowserLauncher.openURL(); instead. It works as expected and has quite a bit more documentation.

Hope that helps,

Ryan

Hi Ryan,

Thanks for your response - I tried BrowserLauncher.openURL() and it works indeed!

Reinhard