Problem with mobile controls in XPages

5 October, 2012 15:00:00 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 05/10/2012 16:06:26

Have you tried setting preload to true on the appPage?

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

Thanks Tim, nice trick. That solved the problem.

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

Thanks Tim, Thanks Miguel Angel

Deja una respuesta


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

¿ Recuérdame?