要自定义现有外观来添加组件:
创建名为 trinidad-skins.xml 的文件并插入以下代码:<skins xmlns="http://myfaces.apache.org/trinidad/skin><skin><id>HspCustom.desktop/<id><family>HspCustom</family><extends>blafplus-rich.desktop</extends><render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id><style-sheet-name>custom/HspCustom.css</style-sheet-name></skin></skins>
在代码中指定以下内容:
Family - 新外观的名称
Style-sheet-name - 包含样式选择器的自定义 css 文件
Extends - 正在修改的外观
覆盖所需的样式选择器。
执行“注册自定义外观”中的任务。