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
Regular Contributor
Posts: 73
Registered: ‎04-02-2012
My Device: BlackBerry Limited Edition Z10, BlackBerry Bold 9900, BlackBerry PlayBook Tablet
My Carrier: Bell Mobility

[Help]- How to use bbUI.js

Hey Everyone, 


I was at the BlackBerry 10 Jam Toronto conference the other day, I signed up for all the sessions in the web track. I was really intrigued by bbUI.js. 

 

Now I'm trying to implement in this sample web app, just to see how it would look. 

 

here is my source code, 

 

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="1.5.1">
<rim:loadingScreen backgroundImage="blackberry.png"
onFirstLaunch="true" />
<name>Maps</name>
<access subdomains="true" uri="http://m.maps.nokia.com"/>
<content src="http://m.maps.nokia.com"/>
<icon src="mapicon.png"/>
<rimSmiley Tongueermissions>
<rimSmiley Tongueermit>read_geolocation</rimSmiley Tongueermit>
</rimSmiley Tongueermissions>
<rimSmiley Surprisedrientation mode="portrait" />
<div data-bb-type="action-bar" data-bb-tab-style="highlight">
<div data-bb-type="action" data-bb-style="tab" data-bb-img="images/actionBar/cog_dark_theme.png">Library</div>
<div data-bb-type="action" data-bb-style="tab" data-bb-selected="true" data-bb-img="images/actionBar/cog_dark_theme.png">Smart</div>
<div data-bb-type="action" data-bb-style="button" data-bb-img="images/actionBar/cog_dark_theme.png" onclick="alert('Find');">Find</div>

</div
</div>
</widget>

 

 

As you can tell, all I'm trying to do is what is called the action bar, See here https://github.com/blackberry/bbUI.js/wiki/Action-Bar

 

 

I can package the app, sign it and load it on to my Dev Alpha without a problem, but I don't get the action bar. Anything I'm doing wrong or missing? 

 

 

Thanks in advance Smiley Happy

Developer
Posts: 409
Registered: ‎06-03-2010
My Device: Z10 Red
My Carrier: Free

Re: [Help]- How to use bbUI.js

Hi,

What does this line means to you?

 

<content src="http://m.maps.nokia.com"/>

Regular Contributor
Posts: 68
Registered: ‎06-12-2012
My Device: Blackberry Bold 9780
My Carrier: Vodafone

Re: [Help]- How to use bbUI.js

<content src="http://m.maps.nokia.com"/>

^ I think thats the starting page of the app
Developer
Posts: 409
Registered: ‎06-03-2010
My Device: Z10 Red
My Carrier: Free

Re: [Help]- How to use bbUI.js

Indeed, so what should you have in your page, if your starting page is "http://m.maps.nokia.com" ?

Regular Contributor
Posts: 73
Registered: ‎04-02-2012
My Device: BlackBerry Limited Edition Z10, BlackBerry Bold 9900, BlackBerry PlayBook Tablet
My Carrier: Bell Mobility

Re: [Help]- How to use bbUI.js

From my understanding, nothing right? Because the application works as it stands although I can't get the actionBar to show up. Keep in mind I'm totally new at this so direct instructions or detailed instructions would be greatly appreciated. Maybe I have to change something in the startpage.html file?
Developer
Posts: 409
Registered: ‎06-03-2010
My Device: Z10 Red
My Carrier: Free

Re: [Help]- How to use bbUI.js

The config.xml is not a place to put html. You should put your file startpage.html in the src attribute of <content> and write all your html stuff here like the action bar
Regular Contributor
Posts: 73
Registered: ‎04-02-2012
My Device: BlackBerry Limited Edition Z10, BlackBerry Bold 9900, BlackBerry PlayBook Tablet
My Carrier: Bell Mobility

Re: [Help]- How to use bbUI.js

OH!, I think I know what you mean, so just to clarify in my startpage.html I put the html stuff like the actionBar there, but I use the <content> element to point to my startpage.html file in the Config.xml?
Developer
Posts: 314
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: [Help]- How to use bbUI.js

that's right.

why dont you go through the docs and learn the basics first? Smiley Wink

Nuno
Regular Contributor
Posts: 73
Registered: ‎04-02-2012
My Device: BlackBerry Limited Edition Z10, BlackBerry Bold 9900, BlackBerry PlayBook Tablet
My Carrier: Bell Mobility

Re: [Help]- How to use bbUI.js

Because I did Smiley Wink

Then when I saw bbUI.js the help documents were not nearly as useful as the RIM documentation from their HTML5/Webworks microsite.
Highlighted
Developer
Posts: 314
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: [Help]- How to use bbUI.js

true, but your problem is not in bbUI.js, it is in creating a basic webworks app. so, go through it again Smiley Tongue
Nuno