I am working on a application where I don’t want the default class applied to a xp:text control and possibly other controls. At the moment, I am doing this in my code:
<xp:text escape="false" id="computedField12" styleClass="noClass">
Notice styleClass=”noClass” above where noClass doesn’t exist. Is there a better way to achieve this selectively for a particular XPage or as an application property and is it possible to turn this on/off for other controls?
I found this: http://xpageswiki.com/web/youatnotes/wiki-xpages.nsf/dx/Work_with_themes
But what I am trying to achieve is setting no class at all by default for a particular control.
Many thanks for your help.
the disableTheme option is 100% valid but you need to remember to apply it to every element of that type to disable the automatic classes for those elements.
Another option is with themes and you are very close to a solution with the link that you supplied. You will need to add a control section to your applications theme to override the theme that you are extending ( webstandard or oneui etc ).
For the xp:text control you need something like the following in your theme document
the override=”true” will allow this control to override the theme your inheriting from. Set to false it will combine with the theme your merging from.
The mode=”override” will specify that if you add a sytleClass to the xp:element then that styleClass will be the only on applied to the element when rendered. If mode=”concat” then the styleClass added to the element will be rendered along with the one specified i the theme control.
if you want to get a list of all the control Theme ID names then Tim Tripcony has a database on his server that lists all the elements with the IDs right here.