问题描述
我正在尝试根据 Extension API 文档添加自定义控件设置选项卡,但不幸的是它不起作用。这是我的属性文件:
<!--
This file is an empty template for your own properties-local.xml file. Please follow the instructions here:
https://doc.orbeon.com/configuration/properties/
-->
<properties xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:oxf="http://www.orbeon.com/oxf/processors">
<property as="xs:string" name="oxf.fb.toolBox.group.custom.uri.*.*">
oxf:/forms/acme/builder/xbl/custom-controls.xbl
oxf:/xbl/acme/firstname/firstname.xbl
oxf:/xbl/acme/lastname/lastname.xbl
oxf:/xbl/acme/iban/iban.xbl
</property>
<property as="xs:string" name="oxf.xforms.xbl.mapping.acme">
oxf:/xbl/acme
</property>
<property
as="xs:string"
name="oxf.fb.extension.control-settings"
value="acme:control-settings"/>
</properties>
控件设置的xbl文件如下:
<xbl:xbl xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
xmlns:xbl="http://www.w3.org/ns/xbl"
xmlns:xxbl="http://orbeon.org/oxf/xml/xbl"
xmlns:acme="http://www.acme.com/xbl">
<xbl:binding element="acme|control-settings" id="acme-control-settings">
<Metadata xmlns="http://orbeon.org/oxf/xml/form-builder">
<display-name lang="en">Custom tab</display-name>
<display-name lang="de">Nachname</display-name>
</Metadata>
<xbl:handlers>
<xbl:handler event="fb-initialize" phase="target">
<xf:setvalue
ref="instance('i')/@question-identifier"
value="event('data-holders')/@question-identifier"/>
</xbl:handler>
<xbl:handler event="fb-apply" phase="target">
<xf:action iterate="event('data-holders')">
<xf:delete ref="@question-identifier"/>
<xf:insert context="." origin="instance('i')/@question-identifier"/>
</xf:action>
</xbl:handler>
</xbl:handlers>
<xbl:implementation>
<xf:model>
<xf:instance id="i">
<_ question-identifier=""/>
</xf:instance>
</xf:model>
</xbl:implementation>
<xbl:template>
<xh:div>
<xf:input ref="instance('i')/@question-identifier">
<xf:label>Question identifier</xf:label>
</xf:input>
</xh:div>
</xbl:template>
</xbl:binding>
</xbl:xbl>
我还尝试删除 xmlns:acme="http://www.acme.com/xbl" 行,即 acme 命名空间将是属性文件中定义的路径,但它没有帮助。我做错了什么?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)