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
New Contributor
mathur_harsh
Posts: 3
Registered: ‎07-12-2011
My Carrier: Airtel

Multiple BrowserField in a screen

Hi,

 

BB OS 6.

I have a Screen wherein I need to display multiple (dynamic) pieces of HTML code. I tried using multiple BrowserField, but it would only display the first one. The rest would just show up as "<".

 

Here is my code snippet:

 

<code>

            for (int i=0 ; i < vTrucos.size(); i++) {
                Truco truco = (Truco) vTrucos.elementAt(i);

                htmlStr = truco.content;
               
                if(htmlStr != null){
                    bf = new BrowserField();
                    bf.displayContent(htmlStr, "");

                    vfmTrucos.add(bf);
                }


</code>

This vector, vTrucos, can have around 25 to 50 entries.

 

Best regards,

Harsh

Please use plain text.
Developer
peter_strange
Posts: 17,703
Registered: ‎07-14-2008

Re: Multiple BrowserField in a screen

Multiple BrowserFields on the same screen does not work well in my experience.  it is difficult to size the Fields and perhaps more importantly, move focus from one Field to another. 

 

Perhaps you should consider concatenating your data and displaying it all on one BrowserField/ 

 

Alternatively search the forum for Threads where they have discussed parsing html and displaying the contents using real BB fields.

Please use plain text.