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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Super Contributor
SumiGhosh
Posts: 307
Registered: ‎09-20-2011
My Carrier: Vodafone
Accepted Solution

Showing browserfield in verticalfieldmanager

Hi all,

I have some html content and i want to show in my application along with other ui components. I'm using below code for that but it is not working.

 

BrowserField myBrowserField;
myBrowserField = new BrowserField();
scrollContainer.add(myBrowserField);
String content ="<html><head></head><body>"+storyParser.storyData.get("description")+"</body></html>";
myBrowserField.displayContent(content,"http://localhost");

add(scrollContainer);

Please use plain text.
Super Contributor
SumiGhosh
Posts: 307
Registered: ‎09-20-2011
My Carrier: Vodafone

Re: Showing browserfield in verticalfieldmanager

It showing null pointer exception while i'm adding browserfield into an scrollable verticalfieldmanager
Please use plain text.
Super Contributor
SumiGhosh
Posts: 307
Registered: ‎09-20-2011
My Carrier: Vodafone

Re: Showing browserfield in verticalfieldmanager

I'm able to resolve this. But i have another issue now, app not able to focus on other ui component after reaching browserfield. This happens in 5.0 devices, its working perfectly in 6.0 and 7.0 devices.

Please use plain text.
Developer
maadani
Posts: 729
Registered: ‎05-04-2011

Re: Showing browserfield in verticalfieldmanager

Hi @

 

Try calling displayContent Before adding the browserField to the manger.

 

Hope that helps,

 

E.

Please use plain text.
Developer
maadani
Posts: 729
Registered: ‎05-04-2011

Re: Showing browserfield in verticalfieldmanager

It's a navigation mode limitation.

 

You can try and override the navigation mode and handle it yourself (check the BrowserFieldConfig API).

 

From personal experience, avoid adding additional UI objects to the screen when using browserField. BrowserField which does not cover the whole screen does not behaves as expected...

E.

Please use plain text.
Super Contributor
SumiGhosh
Posts: 307
Registered: ‎09-20-2011
My Carrier: Vodafone

Re: Showing browserfield in verticalfieldmanager

Thanks.. BrowserFieldConfig Worked.....
Please use plain text.