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 Contributor
sethadam
Posts: 8
Registered: ‎02-21-2012
My Device: Playbook

Help for Web Programmer new to BB

I'm trying to build a BB10 app. I'm an experienced web developer. I started with jQuery and the BB10 theme, which gives me something that looks like a BB10 app, but doesn't really work. I can't figure out how to request data dynamically and make it work - when I inject it into the page with JSONP, the back button no longer works the right way. Also, the action buttons on the bottom don't do anything, and I can't find any documentation on how to "activate" them. 

 

It doesn't seem that injecting and rewriting with JSON and jQuery is the best way to fetch content, but if it the content isn't static, how does one get it? I don't see any good WebWorks tutorials other than a very basic Hello World that really does nothing. 

 

Does anyone know a good place to start with dynamically fetched data in a BB10 app? This is my first time building for Blackberry in any way, please be gentle!

Thanks, 

Adam

Please use plain text.
BlackBerry Development Advisor (Retired)
JsonScott
Posts: 12
Registered: ‎01-17-2012
My Device: Bold 9900

Re: Help for Web Programmer new to BB

Hi Adam,

Thanks for the post.
Do you have a jsfiddle or some code that reproduces the issue, so that I can take a look at it for you?

As for the action buttons you need to register event handlers for them so that they can do something, by default they should "activate" when you click on them. You can also add the class 'pressed' to give them the activated look.
Twitter: @JsonScott
Please use plain text.
New Contributor
sethadam
Posts: 8
Registered: ‎02-21-2012
My Device: Playbook

Re: Help for Web Programmer new to BB

Awesome, thanks for your help Jason!  I hear ya on the event handler. I've had trouble getting external scripts to work altogether, but without any roadmap, I've been trying to figure out where things go wrong. Still not sure if I want to use WebWorks of jQuery. 

 

http://pastebin.com/dkYbjLgU

Please use plain text.
BlackBerry Development Advisor (Retired)
JsonScott
Posts: 12
Registered: ‎01-17-2012
My Device: Bold 9900

Re: Help for Web Programmer new to BB

I would recommend checking out http://jquerymobile.com/test/docs/pages/page-dynamic.html. This shows how to create dynamic pages like you are doing and still have a jquery mobile change page, which would allow the back button to work.
Twitter: @JsonScott
Please use plain text.