我需要添加StyleClass到生成的表单标记xPages.
我不知道是否可以在新主题中更改此控件但我只需要xPage在我的应用程序中使用一个,这是生成的代码:
<form id="view:_id1" method="post" action="/blabla.nsf/index.xsp"
class="xspForm" enctype="multipart/form-data">
Run Code Online (Sandbox Code Playgroud)
我需要这个修改类,例如:
<form id="view:_id1" method="post" action="/blabla.nsf/index.xsp"
class="newclass otherclass" enctype="multipart/form-data">
Run Code Online (Sandbox Code Playgroud)
您可以将以下内容添加到主题中以更改表单标记的类:
<control mode="override">
<name>Form</name>
<property>
<name>styleClass</name>
<value>newclass otherclass</value>
</property>
</control>
Run Code Online (Sandbox Code Playgroud)
更新:使用以下内容仅在名为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>
Run Code Online (Sandbox Code Playgroud)
您可以在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>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
895 次 |
| 最近记录: |