主题用于在服务器端对html代码定制,是domino的一个重要元素,先看-下domino帮助文档对theme的描述
A theme is used to define the look and feel of an application.
Themes are server-side customization of HTML generation that can be used to define the look and feel of an application. A theme can be set globally, to apply to all applications run on that server, or applied to a single application. Different themes can also be applied depending on context.
Themes are different from Style Sheets in that they are not restricted to CSS styles. A theme can assign values to any XML property, including such functional properties as the number of rows displayed by a view. Themes can assign values of JSF expressions, which will be interpreted when a page is created as if that expression was in the source.
Themes can be used to control all XML properties of an XPage. Themes can also control all CSS style properties and the body style attribute for web pages served by Domino®. The same theme can be customized to target the XPages and Domino Web environment with different properties.
Themes are one of the design elements available from the Applications Navigator. The Applications Navigator is the left hand tab shown in the user interface. Themes are available under the Resources design element.
有道翻译一下
,适用于所有应用程序运行在该服务器,或应用于单个应用程序。不同的主题也可以应用取决于上下文。
主题不同于样式表,因为它们不限于CSS样式。一个主题可以赋值到任何XML属性,包括这样的功能属性,如显示一个视图的行数。主题可以赋值的JSF表达式,这将被创建为一个页面的时候,如果表达式是在源。
主题可以用来控制所有XML属性的一个XPage。主题也可以控制所有CSS样式属性和身体风格属性为网页服务于Domino®。相同的主题可以定制目标XPages和Domino Web环境与不同的属性。
主题是一种设计元素可以从应用程序导航器。应用程序导航器是左手选项卡显示在用户界面。主题可以在资源设计元素。
注意:从设计师,XPages支持升级8.5.2主题图书馆oneuiv2命名。这个版本是基于OneUI v2.0.1黄金释放安装Notes / Domino 8.5.2包括众多的CSS,形象,和性能增强。你应该使用这个主题前进。老版本——命名oneui是保留向后兼容性。
格式:
<?xml version="1.0" encoding="UTF-8"?><!-- Theme root tag. extends: defines the theme this theme is inheriting from. Optional. --> <theme extends="theme" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="theme.xsd"> <!-- Theme header. <description>: describe this theme. Optional. --> <description>[Theme runtimeDescription]</description> <!-- Define the list of resources that are automatically inserted in the XPage. <resource>: defines a resource that should be inserted into each XPage target: attribute that define the target technology. Optional. <href>: URI pointing to the resource <content-type>: MIME content type of the resource. Used to generate the correct HTML tag. Optional (uses the file extension if not provided) <description>: Description of the resource. Optional. --> <resource target="xsp"> <description>[Resource Description]</description> <content-type>[Mime Type]</content-type> <href>[Url Reference]</href> </resource> <!-- Define some properties that will be available at runtime to XPages. These properties are available through the ApplicationEx object, as soon as the Theme is loaded. For example, it can define how dojo controls are rendered for this theme. <property>: defines a new property entry target: attribute that define the target technology. Optional. <name>: name of the property to set <value>: value of the property <description>: Description of the resource. Optional. --> <property target="xsp"> <description>[Property Description]</description> <name>[Property Name]</name> <href>[Property Value]</href> </property> <!-- One entry per control. <control>: defines an entry for a control target: attribute that define the target technology. Optional. override: attribute used to ignore the properties defined in the parent theme. Optional. <name>: name of the control <label>: label displayed by Designer. Optional. <description>: description displayed by Designer. Optional. <property>: definition of a property content - As many nodes as necessary target: attribute that define the target technology. Optional. type: attribute that define the property type. Optional, default to 'string'. <name>: name of the property to set <value>: value of the property <description>: description displayed by Designer. Optional. --> <control target="runtime" override="true"> <description>[Control Description]</description> <name>[Control Name]</name> <property target="xsp" type="string"> <description>[Property Description]</description> <name>[Property Name]</name> <value>[Property Value]</value> </property> </control> </theme>