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: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

can BrowserContent be made Persistable or serialized into something that can persist?

I'm maintaining a list of rendered pages, and want some of them to survive after a reboot.

I've had good luck with Persistable objects but AFAIK all members need to be Persistable for

this scheme to work. Is there anyway for me to make a Field or BrowserContent

Persistable or serialize it and just store it as a (Persistable) byte[]? Thanks.

 

Field field = browserContent.getDisplayableContent();  
        if (field != null)
                { 
                 synchronized (this)
 {                   m_back_pages.addElement(browserContent);

Highlighted
BlackBerry Development Advisor
Posts: 15,808
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: can BrowserContent be made Persistable or serialized into something that can persist?

No, this would not be supported.  You could store the pages in the persistent store in their RAW HTML form and use that after a reboot.  But it is not possible to store the content in its rendered form.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.