我们正在从 Orbeon 3.9 升级到 4.5。
在 Orbeon 3.9 中,我们将请求参数传递给发送成功 URI (oxf.fr.detail.send.success.uri
)当用户单击自定义提交按钮时。我们通过修改来做到这一点persistence-model.xml
.
以下是我们在3.9中使用的代码部分:
<xforms:model id="fr-persistence-model"
<xforms:instance id="x3params">
<data xmlns="">
<customerid/>
</data>
</xforms:instance>
<xforms:action ev:event="xforms-model-construct-done" if="$app != '*' and $form != '*'">
<xforms:setvalue ref="instance('g3params')/customerid" value="xxforms:get-request-parameter('customerid')" />
<xxforms:variable name="g3customerId" as="xs:string" select="instance('g3params')/customerid"/>
<xforms:submission id="fr-workflow-send-submission"
resource="{$workflow-success-uri}?fr-app={$app}&form={$form}&docid={$document}&customerid={$g3customerId}"
relevant="{xxforms:property(string-join(('oxf.fr.detail.send.success.prune', $app, $form), '.'))}"
validate="false" method="{$workflow-success-method}"
serialization="{if ($workflow-success-method = 'get') then 'none' else 'application/xml'}"
ref="if (instance('fr-workflow-send-instance') != '') then instance('fr-workflow-send-instance') else xxforms:instance('fr-form-instance')"
replace="all"/>
在 Orbeon 4.5 中,我使用了save-final
自定义提交的流程。
Since fr-workflow-send-submission
在4.5中被删除,如何将请求参数传递给发送成功URI?
以下是我的properties-local.xml:
<property as="xs:boolean" name="oxf.fr.detail.send.pdf" value="false"/>
<property as="xs:boolean" name="oxf.fr.email.attach-pdf" value="false"/>
<property as="xs:anyURI" name="oxf.fr.detail.send.success.uri.Preconstruction.*" value="http://localhost:8080/webapp/new"/>
<property as="xs:string" name="oxf.fr.detail.send.success.method.*.*" value="post"/>
<property as="xs:boolean" name="oxf.fr.detail.send.success.prune.*.*" value="false"/>
您可以在服务 URL 中使用 XPath 值模板:
<property
as="xs:string"
name="oxf.fr.detail.send.success.uri.Preconstruction.*"
value="http://localhost:8080/webapp/new?customerid={xxf:get-request-parameter('customerid')}"/>
Orbeon 表格通行证app
, form
and document
现在默认。唯一的事情是我注意到在你的代码中你使用fr-app
, form
, and docid
。现在最好改用 Orbeon Forms 使用的标准名称(所以app
, form
and document
).
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)