主题 theme定制系统

 主题用于在服务器端对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.

Note: Starting with Designer 8.5.2, XPages supports an upgraded theme library named oneuiv2. This release is based on the OneUI v2.0.1 gold release installed with Notes/Domino 8.5.2 which includes numerous CSS, image, and performance enhancements. You should use this theme going forward. The older version - named oneui is retained for backward compatibility.

有道翻译一下

,适用于所有应用程序运行在该服务器,或应用于单个应用程序。不同的主题也可以应用取决于上下文。
主题不同于样式表,因为它们不限于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>

 

 


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值