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
Contributor
Posts: 25
Registered: ‎03-31-2011
My Device: Playbook
My Carrier: N/A

Just packaged JQueryMobile app locally and wont work - please advise

Hi guys,

 

I have been happily developing my Playbook app for the past few months using JQueryMobile - but developed using a .bar file that calls the files off my local server.

 

All has been working perfectly but I just packaged up my app ready to submit - so it runs locally on the simulator - but while it loads up the first page, when I try to click on a button to open another page it just sits on the 'loading' animation.

 

After some searching I see this is a known problem...

 

My question.. If I submit now, will it be ok as the testers will be loading it onto the real hardware which I assume does not have this problem?

 

I am going spare here as I'm worried that if I submit it will fail and all my work will be wasted.

 

Would really appreciate some advice on this before I submit.. Smiley Indifferent

 

Thanks in advance,

James.

Developer
Posts: 33
Registered: ‎03-04-2011
My Device: PlayBook

Re: Just packaged JQueryMobile app locally and wont work - please advise

Hi James,

 

What version of jQuery are you using? jQuery 1.5.2 was released a couple of days ago, and may fix the problems you're encountering.

 

http://blog.jquery.com/2011/03/31/jquery-152-released/

Developer
Posts: 669
Registered: ‎02-19-2011
My Device: BlackBerry PlayBook 32GB
My Carrier: Sprint

Re: Just packaged JQueryMobile app locally and wont work - please advise

I just did some testing and came to the conclusion that loading new pages locally STILL doesn't work.

When I use:

 

 

jQuery.mobile.changePage("about.html", "fade");

 

 

I get a jQuery Mobile 'error loading page' popup. In firebug lite it DOES show that it's performing the GET request. I suppose it's failing somehow.

 

Still, the only way to transition to other pages is by having all pages in the same document by using several sections like this:

 

 

<div data-role="page" id="page1">
...
...
</div>
<div data-role="page" id="page2">
...
...
</div>

 

You can then transition to other pages by either linking to #pageid or by using the programmatic way:

 

 

jQuery.mobile.changePage("#pageid", "fade");

 

 

The fact that we still can't do something simple as loading a local page is incredibly annoying. I wish it would get fixed because stuffing everything in one document at some point isn't an option anymore when there's a lot of markup / functionality in the app.

 

The only good news I can report is the fact that JQuery 1.5.2 is at least not broken in the simulator like 1.5.1 was.

 

Come on RIM, us WebWorks folks really need this stuff fixed!

 

Staff UI Prototyper (read: full-time hacker)


My BB10 apps: Screamager | Scientific RPN Calculator | The Last Weather App

Developer
Posts: 33
Registered: ‎03-04-2011
My Device: PlayBook

Re: Just packaged JQueryMobile app locally and wont work - please advise

Good to hear jQuery 1.5.2 helped solve some of the issues!

 

Remotely loading in pages should work. Can you get the code from the demo files up and running?

Developer
Posts: 669
Registered: ‎02-19-2011
My Device: BlackBerry PlayBook 32GB
My Carrier: Sprint

Re: Just packaged JQueryMobile app locally and wont work - please advise

I haven't tried. I'm working on my own app at the moment and this is just part of what I found while doing it Smiley Happy

Staff UI Prototyper (read: full-time hacker)


My BB10 apps: Screamager | Scientific RPN Calculator | The Last Weather App

Developer
Posts: 669
Registered: ‎02-19-2011
My Device: BlackBerry PlayBook 32GB
My Carrier: Sprint

Re: Just packaged JQueryMobile app locally and wont work - please advise

Here's a screencast of the app i'm working on.

I tried having the various screens as separate HTML files but this simply wouldn't work. I ended up following the approach I posted earlier.

 

Staff UI Prototyper (read: full-time hacker)


My BB10 apps: Screamager | Scientific RPN Calculator | The Last Weather App

Contributor
Posts: 25
Registered: ‎03-31-2011
My Device: Playbook
My Carrier: N/A

Re: Just packaged JQueryMobile app locally and wont work - please advise

Thanks for the info guys.

 

I am really concerned though that my app is going to fail when the RIM testers install it on their hardware to test.

 

Any idea if this is just a problem in the simulator but should work on the latest hardware builds RIM are using?

 

If my app is rejected due to this and I miss out on a free Playbook I'll be gutted. I've spent 2 months developing my app and really want to develop more for the platform.

 

The browser engine does work 100% with JQM when called remotely (remote URL specified in the config.xml) so I know my app does work on the tablet.. Just not when packaged locally. Smiley Sad

Developer
Posts: 33
Registered: ‎03-04-2011
My Device: PlayBook

Re: Just packaged JQueryMobile app locally and wont work - please advise

[ Edited ]

@TheMarco: Try the code from the demo files. If all works as expected you can then compare it to your own code to see where the problem is.

 

@JamesAllen: Did jQuery 1.5.2 not help? This seems like an framework compatibility issue which could exist on the actual hardware too.

Developer
Posts: 669
Registered: ‎02-19-2011
My Device: BlackBerry PlayBook 32GB
My Carrier: Sprint

Re: Just packaged JQueryMobile app locally and wont work - please advise

I don't think anyone is going to get rejected because of some platform bugs. That would be ridiculous. Then again I don't work for RIM so I can't be sure obviously. I'd be more worried if I were one of those folks who submitted last minute and have April 1 as a timestamp on their entry.

Staff UI Prototyper (read: full-time hacker)


My BB10 apps: Screamager | Scientific RPN Calculator | The Last Weather App

Contributor
Posts: 25
Registered: ‎03-31-2011
My Device: Playbook
My Carrier: N/A

Re: Just packaged JQueryMobile app locally and wont work - please advise

@jeevantakhar

I haven't tried with 1.5.2 - be an interesting test.

 

The thing is though, the app works 100% if I load it onto the simulator with a config.xml that targets my local dev server. Therefore, the framework is working correctly. I built the app this way and continually tested it on the simulator and it worked fine that way.

 

Isn't the local ajax load issue a bug in the way the simulator handles local page loading - rather than it being a JQM

problem?

 

**EDIT: Just tried with Jquery 1.5.2 and it's still not working. I was using 1.5.