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
New Developer
Posts: 23
Registered: ‎11-05-2009
My Device: Not Specified

Widget Navigation

Within the widgets, if I navigate to a page running on an external server, but running in the widget... is it possible to link back to a local widget page from the remote page?

 

If I use a local:/// tag will this work?

New Developer
Posts: 23
Registered: ‎11-05-2009
My Device: Not Specified

Re: Widget Navigation

OK I just answered this myself... it works perfectly!

 

Lets say I have a link in a widget page to a remote page, example:

 

<a href="http://www.mysite.com/somnepage.html">Link</a>

 

Once I'm on the remote page, all I need to do to get back to the local page is:

 

<a href="local:///localpage.html">Link back to local</a>

 

Good job RIM Smiley Wink

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Widget Navigation

Also if you have JavaScript or images that are relatively static and don't change you can embed them in your widget archive and refer to them in your dynamic content you pull from the server.

 

so you can do something like:

<img src="local:///img/myimg.png" />

 

or 

 

<script type="text/javascript" src="local:///scripts/foo.js"></script>

 

In the page you are serving up from your website

 

It gives you lots of deployment possibilities Smiley Happy

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Developer
Posts: 23
Registered: ‎11-05-2009
My Device: Not Specified

Re: Widget Navigation

Yes! I already discovered that and tested it... haha it works very well...

 

The only thing I wish was better right now is that page loading is quicker in the browser than the widget... for example:

 

Browser load time: 4~5 seconds

Widget load time: 12~14 seconds

 

Is this all because of caching not enabled in the browser yet? Or is there more to it?

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Widget Navigation

There are a couple of reasons for this..

 

1) When you launch a widget for the first time it needs to initialize the browser engine.  Much like the first time you load Firefox on your desktop.  Then when you load subsequent pages it is fast.  Our BlackBerry Browser cheats a little in the fact that it has started in the background when the device boots

 

2) The lack of caching means that any remote resources are going to always be pulled from the network.  We are currently working on the caching capability so it is on the way

 

Once you have your widget open, pulling in an external page that hasn't been cached should be comparable to loading it in the browser.

 

We also demonstrated some Loading screens at the Developer Conference where we even demonstrated screen transitions between loading states.  So there's lots to come Smiley Happy

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Developer
Posts: 23
Registered: ‎11-05-2009
My Device: Not Specified

Re: Widget Navigation

Yeah the non cached pages seem to load about the same, but from there the browser wins with the caching...

I really hope you guys get it soon, I feel the aching is the only real slight problem I see now...

 

And there ya go teasing me with the tranisions and such... Smiley Surprised haha wish I could have made it out to Dev Con

Highlighted
New Contributor
Posts: 6
Registered: ‎11-28-2012
My Device: Torch 9800
My Carrier: Docomo

Re: Widget Navigation

HI,

 

I am not able to access local:///  resources from external site page. Do we have to set any permission anywhere.

I have whitelisted that domain in config.xml.