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
Highlighted
Developer
Posts: 386
Registered: ‎07-20-2012
My Device: Blackberry Z10 (White), BlackBerry Dev Alpha C
My Carrier: O2 UK

BBUI.js actionBar and actionMenu

Hello,

 

I have already created my app (A currency converter) using HTML5 WebWorks and everything works fine but what I'm really looking for is 'the native blackberry look-and-feel' that BBUI.js offers. The problem I'm having is where to I put the code needed to create an actionBar and an actionMenu with sharing options within my index.html file or my home.html file (This is my first page that gets loaded on opening). I'm having this problem because I didn't really understand the tutorial in the github wiki and when I follow this tutorial:

http://opensourcebb.com/osbbx/index.php/tutorials/25-webworks-tutorials/bbui-js-tutorials/16-getting...

 

and run the app in Ripple Emulator no pictures are shown much like in the image that I have attached. 

 

actionbar

 

I'm also looking into creating an update function and linking the code to a server or using an api to retrieve exchange rates (so that I don't have to do it manually when the rates change)

 

Any help would be very much appreciated.

 

Thanks in advance!

 

Developer
Posts: 314
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: BBUI.js actionBar and actionMenu

Hi

 

you can not open the pages directly. you must open index.html, and then push the screens via bbUI, so that it automatically applies the styling to the controls.

Nuno
Developer
Posts: 386
Registered: ‎07-20-2012
My Device: Blackberry Z10 (White), BlackBerry Dev Alpha C
My Carrier: O2 UK

Re: BBUI.js actionBar and actionMenu

I currently have this line of code in my index.html 

 

"

bb.pushScreen('home.html', 'home');
}, false);" 

 

Should I change false to true?

Trusted Contributor
Posts: 176
Registered: ‎01-20-2013
My Device: Bold 9790
My Carrier: Telus

Re: BBUI.js actionBar and actionMenu

You need to learn how the Ripple emulator is used. If you don't have a web server set up, the URL will look similar to 

http://localhost:9910/HelloWorld/index.html

 

Read this page (and probably some other links down the left menu of that page):

https://developer.blackberry.com/html5/documentation/accessing_a_local_project_in_ripple_1948645_11....

 

As for your code sample, the

bb.pushScreen('home.html', 'home');

part looks fine. The "false" part on the next line is just a fragment of a line and doesn't belong there, since the previous line already ended with a semi-colon.

Developer
Posts: 386
Registered: ‎07-20-2012
My Device: Blackberry Z10 (White), BlackBerry Dev Alpha C
My Carrier: O2 UK

Re: BBUI.js actionBar and actionMenu

Thanks, but I already know how to use the ripple emulator it is located at localhost:9910 The image I attached was an example of when I open the home.html file and I said the exact same thing happens in ripple. 

 

Therefore, I was wondering, what other lines of code do I need to add to just have a simple actionBar and actionMenu functioning?