使用 Java 应用程序运行 Orbeon-Form-Builder-Generate-Form
我是否应该能够使用 Java 应用程序运行 Orbeon-Form-Builder-Generate-Form,
即将表单的源复制到 simple.JSP 中(使用 http://wiki.orbeon.com/forms/doc/developer-guide/xforms-with-java-applications)?
我发现$form-resources的评估失败。 为什么?
simple.jsp XML
<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:exforms="http://www.exforms.org/exf/1-0"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
xmlns:saxon="http://saxon.sf.net/"
xmlns:sql="http://orbeon.org/oxf/xml/sql"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<xhtml:head>
<xhtml:title>Simple Form</xhtml:title>
<xforms:model id="fr-form-model">
<!-- Main instance -->
<xforms:instance id="fr-form-instance">
<form>
<section-1>
<control-2/>
</section-1>
<section-2>
<control-3/>
</section-2>
</form>
</xforms:instance>
<!-- Bindings -->
<xforms:bind id="fr-form-binds" nodeset="instance('fr-form-instance')">
<xforms:bind id="section-1-bind" nodeset="section-1">
<xforms:bind id="control-2-bind" nodeset="control-2" name="control-2" type="xforms:date"/>
</xforms:bind>
<xforms:bind id="section-2-bind" nodeset="section-2">
<xforms:bind id="control-3-bind" nodeset="control-3" name="control-3"/>
</xforms:bind>
</xforms:bind>
<!-- Metadata -->
<xforms:instance id="fr-form-metadata" xxforms:readonly="true">
<metadata>
<application-name>test</application-name>
<form-name>testf</form-name>
<title xml:lang="en">Simple Form</title>
<description xml:lang="en"/>
<author/>
<logo mediatype="" filename="" size=""/>
</metadata>
</xforms:instance>
<!-- Attachments -->
<xforms:instance id="fr-form-attachments">
<attachments>
<css mediatype="text/css" filename="" size=""/>
<pdf mediatype="application/pdf" filename="" size=""/>
</attachments>
</xforms:instance>
<!-- All form resources -->
<!-- Don't make readonly by default in case a service modifies the resources -->
<xforms:instance id="fr-form-resources" xxforms:readonly="false">
<resources>
<resource xml:lang="en">
<control-3>
<label>input 2</label>
<hint/>
<help/>
<alert/>
</control-3>
<control-2>
<label>dATE</label>
<hint/>
<help/>
<alert/>
</control-2>
<section-1>
<label>sec1</label>
<help/>
</section-1>
<section-2>
<label>sec2</label>
<help/>
</section-2>
</resource>
</resources>
</xforms:instance>
<!-- Utility instances for services -->
<xforms:instance id="fr-service-request-instance" xxforms:exclude-result-prefixes="#all">
<request/>
</xforms:instance>
<xforms:instance id="fr-service-response-instance" xxforms:exclude-result-prefixes="#all">
<response/>
</xforms:instance>
</xforms:model>
</xhtml:head>
<xhtml:body>
<fr:view>
<xforms:label ref="instance('fr-form-metadata')/title"/>
<fr:body>
<fr:section id="section-1-section" bind="section-1-bind">
<xforms:label ref="$form-resources/section-1/label"/>
<xforms:help ref="$form-resources/section-1/help"/>
<fr:grid columns="1">
<xhtml:tr>
<xhtml:td>
<xforms:input xmlns:xbl="http://www.w3.org/ns/xbl"
xmlns:fb="http://orbeon.org/oxf/xml/form-builder"
xmlns:pipeline="java:org.orbeon.oxf.processor.pipeline.PipelineFunctionLibrary"
id="control-2-control"
bind="control-2-bind">
<xforms:label ref="$form-resources/control-2/label"/>
<xforms:hint ref="$form-resources/control-2/hint"/>
<xforms:help ref="$form-resources/control-2/help"/>
<xforms:alert ref="$fr-resources/detail/labels/alert"/>
</xforms:input>
</xhtml:td>
</xhtml:tr>
</fr:grid>
</fr:section>
<fr:section id="section-2-section" bind="section-2-bind">
<xforms:label ref="$form-resources/section-2/label"/>
<xforms:help ref="$form-resources/section-2/help"/>
<fr:grid columns="1">
<xhtml:tr>
<xhtml:td>
<xforms:input xmlns:xbl="http://www.w3.org/ns/xbl"
xmlns:fb="http://orbeon.org/oxf/xml/form-builder"
xmlns:pipeline="java:org.orbeon.oxf.processor.pipeline.PipelineFunctionLibrary"
id="control-3-control"
bind="control-3-bind">
<xforms:label ref="$form-resources/control-3/label"/>
<xforms:hint ref="$form-resources/control-3/hint"/>
<xforms:help ref="$form-resources/control-3/help"/>
<xforms:alert ref="$fr-resources/detail/labels/alert"/>
</xforms:input>
</xhtml:td>
</xhtml:tr>
</fr:grid>
</fr:section>
</fr:body>
</fr:view>
</xhtml:body>
</xhtml:html>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
支持单独部署 Form Runner 的代码是在 3.9 版本之后推送的。截至撰写本文时,3.9 是最新版本,因此有时您需要使用每夜构建
The code to support Form Runner in separate deployment was pushed after the 3.9 release. As of this writing, 3.9 is the latest release, so at points you'll need to use a nightly build for this.