Setting theme properties

By using a theme you can assign values to any JSF control properties when the XPage is created.

Setting theme properties

A control can have multiple properties set, each of them mapping to a value. A property is identified by a unique name (per control):

<control>
  <name>Button</name>
  <property>
    <name>styleClass</name>
    <value>buttonClass</value> 
  </property>
  <property>
    <name>outerStyleClass</name>
    <value>buttonOuterClass</value> 
  </property>
</control>

The example above illustrates the definition of a Button control. First styleClass is set to the value buttonClass, then outerStyleClass is set to the value buttonOuterClass.

Any property set by the developer in the XPage takes precedence over a theme. In other words, if a property has been set by the developer, then the theme value for this property is ignored.

The property names directly map to the JSF control properties. Any kind of property can be set this way.

Because XML is not typed while JSF is, the attribute type should be used when setting a property that is not a string. The possible values for this attribute are the basic Java™ types:

char, byte, short, int, long, float, double and boolean