10-10-2011 10:55 PM
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
10-11-2011 05:19 AM
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.