Categories
Mobile XPages

jQuery Mobile Seems incompatible with XPages in Domino 9.0

So it’s no secret that I’m doing a lot of XPages Web Development for iPads and I have a complete love – hate relationship with XPages Mobile controls.  In some ways they’re great.  In some ways they are not so great at all.  Not all of that is XPages fault – though some is – but some of the problem is in the Dojo that drives the mobile controls.

So I really want to abandon Mobile Controls, if nothing else the whole single page App is just really really hard to debug.  If you navigate to a page you can’t EASILY view source for instance.  You need to catch it with a tool like firebug.

Anyway, so I found this project that I really wanted to use.  https://github.com/commadelimited/jQuery-Mobile-Bootstrap-Theme

In theory it’s a marriage of Twitter Bootstrap and a css “theme” that makes some elements look like you would on a mobile device.  Ideally I’d love to have the mobile look and feel since I think it’s easier for the users then a glorified web page, but I’m desperate to get to normal XPages and away from these virtual pages.  Even if the fancy transitions are lost I don’t really care any more.

So it seems it’s not just a CSS framework like I thought but it does require jQuery Mobile.  Ok – I gave it a try and guess what.  It didn’t work.  not at all.  The mobile goodies would NOT render!

Until I completely disabled Dojo!

Disabling Dojo is not an option for me.  I just can’t hand code all that stuff.  It’s not going to happen.  I’m going to be using XPages I want to USE XPages.  But why didn’t it work?  Well I had to turn to the jQuery Master himself – Mark Roden.  He took a look at it for me which I greatly appreaciated!

We’re not sure, but we think there’s a conflict between Dojo and jQuery Mobile with the “data-role” attribute.  I guess both frameworks make use of that and Dojo 1.8 grabs it first and shuts jQuery out. If I downgraded Dojo I BELIEVE it would work but that’s not an option for me.=

Apparantly I’m not the only one with this problem.

That’s what I think I know at least.  If anyone knows something else please chime in!

Personally I’m not sure what to do.  XPages Mobile controls are difficult and missing things like a bottom TabBar, though I believe the redPill company has solved that problem.  I believe Kendo UI uses virtual pages as well.  JQuery Mobile seems like you need to drop Dojo.

I think I might try the Twitter Bootstrap 3 Release Candidate.  Not really sure though.

Kinda annoying actually…