Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Contributor
Posts: 8
Registered: ‎04-06-2011
My Device: 9330
My Carrier: spring
Accepted Solution

BrowserCon​tent is null (The rendering applicatio​n must be not-null).

Hi

 

   I developed the application with JDE 5.0 and run the application on 5.0 and 6.0 version simulators.

 

In the application i have the browser content for rendering the html content. I used the following code in my application.

 

     
        
        try
        {
            bc = renderingSession.getBrowserContent(connection, url, null, 0);
            
            Field f= browserContent.getDisplayableContent();
            
            if (f!= null)
            {
                                 browserContentManager.add(f);
             }
            bc.finishLoading();
        }
        catch (RenderingException e)
        {
            System.out.println(e);
        }

 

 

The above code is working fine on 5.0 version simulators and devices. And i tested the application with blackberry JDE 6.0 version and i got an exception. The html content is not displaying on both simulator/device. I debuging the application from that i am getting null in bc (bc = renderingSession.getBrowserContent(connection, url, null, 0) . I have the connection but the browser content returns null, and the  exception  is net.rim.device.api.browser.field.RenderingExceptio​n (The rendering application must be not-null).

 

 

But the same application was worked  on jde 5.0 versions simualtor/devices.

New Contributor
Posts: 8
Registered: ‎04-06-2011
My Device: 9330
My Carrier: spring

Re: BrowserCon​tent is null (The rendering applicatio​n must be not-null).

I tried the following,its throwing same exception.

 

try

{

HttpConnection connection = new HttpConnectionImpl(termsAndConditions);
renderingSession = RenderingSession.getNewInstance();
renderingSession.getRenderingOptions().setProperty(RenderingOptions.CORE_OPTIONS_GUID,RenderingOptio

ns.SHOW_IMAGES_IN_HTML, false);
browserContent = renderingSession.getBrowserContent(connection,null,null);
Field field = browserContent.getDisplayableContent();
verticalFieldManager.add(field);

}

Highlighted
New Contributor
Posts: 8
Registered: ‎04-06-2011
My Device: 9330
My Carrier: spring

Re: BrowserCon​tent is null (The rendering applicatio​n must be not-null).

I have implemented RenderingApplication interface with the class,

 

then i made following changes:

try

{

HttpConnection connection = new HttpConnectionImpl(termsAndConditions);
renderingSession = RenderingSession.getNewInstance();
renderingSession.getRenderingOptions().setProperty​(RenderingOptions.CORE_OPTIONS_GUID,RenderingOptio

ns.SHOW_IMAGES_IN_HTML, false);
browserContent = renderingSession.getBrowserContent(connection,this,null);
Field field = browserContent.getDisplayableContent();
verticalFieldManager.add(field);

}

 

so its working fine nowSmiley Happy