Problem with mobile controls in XPages

5 October, 2012 01:00:00 PM Miguel Calvo  English  XPages  |  Comentarios (3)

UPDATE: Solved the problem by setting preload="true"  in the appPage properties

Sometimes in XPages development you have to encapsulate in a customControl both design and resources. For a project, I'm trying to encapsulate in a customControl the panel to show a Google Map plus the logic needed in order to make it work. This customControl should be reusable anywhere without caring for JS or initialization logic.

Although this is working fine with XPages desktop browser development, it doesn't work it you are using the mobile controls included in UpgradePack 1.

NOTE: This is a simplified example.

This is my cc ccJS with JS resources and a panel.

Image:Problem with mobile controls in XPages

Embedding this in an XPage is going to work fine, but if you embed this in a mobile app then the resources block gets filtered out

This XPage rendered in a browser doesn't download the javascript.

Image:Problem with mobile controls in XPages

One solution could be to split the customControl in two and separate the resources files from the panel...

Image:Problem with mobile controls in XPages


..but this is not the best approach in designing customControls and it would be different from what is working in desktop browser development.

Gravatar Image
1) Problem with mobile controls in XPages
Tim Tripcony 10/05/2012 2:06:26 PM

Have you tried setting preload to true on the appPage?

Gravatar Image
2) Problem with mobile controls in XPages
Miguel Angel Calvo 10/05/2012 2:50:13 PM

Thanks Tim, nice trick. That solved the problem.

Gravatar Image
3) Problem with mobile controls in XPages
Dani 10/05/2012 5:03:33 PM

Thanks Tim, Thanks Miguel Angel

Deja una respuesta


Nota:  (No HTML - Los enlaces serán convertidos si están precedidos por http://)

¿ Recuérdame?