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
Developer
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380
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);

Developer
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380
My Carrier: Vodafone

Re: Showing browserfield in verticalfieldmanager

It showing null pointer exception while i'm adding browserfield into an scrollable verticalfieldmanager
Developer
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380
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.

Developer
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: Showing browserfield in verticalfieldmanager

Hi @

 

Try calling displayContent Before adding the browserField to the manger.

 

Hope that helps,

 

E.

Highlighted
Developer
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

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.

Developer
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380
My Carrier: Vodafone

Re: Showing browserfield in verticalfieldmanager

Thanks.. BrowserFieldConfig Worked.....