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

Web and WebWorks Development

Reply
Visitor
Posts: 1
Registered: ‎07-13-2012
My Device: BB Curve 9220
My Carrier: VN Mobifone

How to re-render a website

How can I re-render a website and display it in a BB Device without modify that website? Can I make some Content Adaptation on BB Device using Webworks?

Developer
Posts: 119
Registered: ‎05-27-2010
My Device: 9900
My Carrier: Vodafone NL

Re: How to re-render a website

What exactly do you want to achieve ?

Do you just want to display your webpage/site in the BlackBerry browser ?
Or do you want your Webpage/site to be like an Application ?

Do you want to modify the look and feel to fit the mobile screen ?
@reumerd-- @BBDevGroupNL -- about me
If you like it, LIKE it ;-) ----- If it's solved, press solved ! --- If you solved it yourself, please let us know! We might have the same problem!
Highlighted
Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: How to re-render a website

I read this as "Can I download a website, modify its contents locally, and display my local changes to the screen?"

 

I would actually recommend against doing this - its just going to be messy, and if you have a complicated page you are processing, I don't think you'll be happy with the results.  Also, you will always be dependant on that remote content.  if it changes, any dependencies your local logic may have could fail and your page will stop working.

 

However, the short answer to the above question is "yes".  The longer, of course, is "how do you do it".  To that there are a few suggestions:

 

  • Use WebWorks to download the remote content of a page, inject your own content on top of it as part of global listeners (e.g. add your own CSS stylesheet)
  • Create your own BrowserField app, implementing your own handleResourceRequest and handleNavigation methods.  Interpret the HTTP request for each piece and render accordingly.
  • Use Ajax to download specific HTTP resources and modify that content before displaying it to the screen.

 

Each solution has their own pros & cons.

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.