Manipulating CSS mobile controls styles in Domino Upgrade Pack 1

15 May, 2012 17:13:11 Miguel Calvo |  Comentarios (0)

By installing Domino 8.5.3 Upgrade Pack 1 we get a nice set of new controls for developing XPages applications. Mobile controls are part of them.

Image:Manipulating CSS mobile controls styles in Domino Upgrade Pack 1

You can use the controls to develop your mobile apps in XPages. The XPages source code gets transformed in run-time in HTML with Dojo embedded. The CSS styles are applied automatically, because class attributes as mblDataViewTextTitle are included automatically in the HTML generated.

Image:Manipulating CSS mobile controls styles in Domino Upgrade Pack 1

In some cases you, as a developer, can change or add new styles, inline or as new css resources in the XPage, to the HTML elements that are going to be created. But in some cases you can't as the styles applied automatically by the XPages framework take precendence over the styles applied at the source XPage and the inline styles get removed.

customMobile.css is a CSS file included in the Upgrade Pack that is injected automatically. The file is not in the domino HTML file system so is not easy to change its contents.

The CSS file is part of the OSGI bundle Domino\osgi\extlib\eclipse\plugins\com.ibm.xsp.extlib.mobile_8.5.3.20111208-0717.jar  installed by the Upgrade Pack.

You can unzip the file and change the contents of any of its files, for instance customMobile.css.

Image:Manipulating CSS mobile controls styles in Domino Upgrade Pack 1

By zipping again the file structure and replacing the original com.ibm.xsp.extlib.mobile_8.5.3.20111208-0717.jar  file you can make Domino use the modified css file.

However, a problem will appear when you install the new Upgrade Pack 2 ( yet to be published ) because it will replace the jar file and the changes will get lost. In any case, I'm sure that the XPages Extension Library team is thinking of a way of solving this problem. :-) Maybe just by letting the XPage resources, included in the source, load later in the HTML file.

Sé el primero en comentar la noticia

Deja una respuesta


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

¿ Recuérdame?