WHITE PAPERS  |  PRICING  |  DOWNLOADS

 

username

password

 

 

 

 

 

 

 

 

 

 

  Server Edition Details  

 

  > Features  

  > Key Benefits  

  > Screenshots  

  > Standards Supported  

  > Pricing  

  > Download Now

 

 

  Developer Resources  

 

  > API Documentation  

  > Developers Guide  

  > Code Examples  

  > Updated Builds  

  > Technical Articles  

 

 

 

 

 

Jump to:

General WebRenderer Functions

  WebRenderer example code base.

 

Advanced WebRenderer functions

 

Application test examples

 

Deploying WebRenderer

WebRenderer DOM

  

  

 

WebRenderer cancelling document loading

 

 

 

Dynamic load cancelling at runtime

Preventing specific domains from loading with WebRenderer is performed by the BrowserEvent blockLoad() method. The blockLoad() method is only effective if called within the onLoadIntercept method, due to the order in which pages are loaded.


IBrowserCanavs browser = BrowserFactory.spawnMozilla();

browser.addBrowserListener(new BrowserAdapter(){
    //Called before any document is loaded or request sent
    public void onLoadIntercept(BrowserEvent e) {
         if(e.getURL().toLowerCase().indexOf("google.com") != -1) {
                //Call to prevent URL from loading - no request is sent to Web Server if this method is called
                e.blockLoad();
         }
    }
});


An alternative to using onLoadIntercept is the IBrowserCanvas method stopLoad(). The stopLoad method can be used in the onBeforeNavigate BrowserEvent. stopLoad() will stop documents loading much like a browser stop button. Requests are usually sent to the web server if stopLoad() is used, but document downloading is cancelled. This is relevant for use in a browser Stop button but may not be suitable for automated trapping applications where browser navigation is to be filtered.

  top

 

 

 Sun, Sun Microsystems, and the Sun Logo are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries 

Privacy Policy  |   Disclaimer