我需要将StyleClass
添加到xPages
生成的表单标记中。
我不知道是否可以在新主题中更改此控件但我在我的应用中只需要一个xPage
,这是生成的代码:
<form id="view:_id1" method="post" action="/blabla.nsf/index.xsp"
class="xspForm" enctype="multipart/form-data">
我需要这个修改类,例如:
<form id="view:_id1" method="post" action="/blabla.nsf/index.xsp"
class="newclass otherclass" enctype="multipart/form-data">
答案 0 :(得分:7)
您可以在主题中添加以下内容以更改表单标记的类:
<control mode="override">
<name>Form</name>
<property>
<name>styleClass</name>
<value>newclass otherclass</value>
</property>
</control>
更新:使用以下内容仅在名为index.xsp的XPage上使用此功能:
<control mode="override">
<name>Form</name>
<property>
<name>styleClass</name>
<value>#{javascript:(view.getPageName() == '/index.xsp')?'newClass otherClass':'xspForm'}</value>
</property>
</control>
答案 1 :(得分:5)
您可以在XPage上添加自己的xp:表单:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" createForm="false">
<xp:form styleClass="newclass otherclass">
... add your components here ...
</xp:form>
</xp:view>
答案 2 :(得分:0)