Form Builder を使用して、Orbeon Forms の展開をステージングしています。
つまり、コードを Form Builder -> Edit Source にコピーして、FB と Oxygen の間でフォーム定義を反復します。次に、フォーム定義を保存して公開します。
これは 4.2 では問題なく動作しているように見えました (OK - いくつかのコメントが失われますが、理想的ではありませんが、機能はありません)。4.3を使用すると、非常に異なる状況が発生します。Form Builder で保存すると、実際のコードが削除されます (理想的ではありません)。他の誰かがこれを見たことがありますか?
たとえば、私のコード:
<xf:action id="create-job-binding">
<!-- React to event... on control... -->
<xf:action ev:event="DOMActivate" ev:observer="save-job-control" if="true()">
<!-- Service to call -->
<xf:send submission="new-job-submission"/>
</xf:action>
<!-- Request actions -->
<xf:action ev:event="xforms-submit" ev:observer="new-job-submission">
<!-- Get reference to initial request -->
<xf:var name="request-instance-name" value="'new-job-instance'" as="xs:string"/>
<!-- Copy over to read-write request instance -->
<xf:insert ref="instance('fr-service-request-instance')"
origin="saxon:parse(instance($request-instance-name))"/>
<!--<xf:insert ref="instance('fr-service-request-instance')" origin="instance($request-instance-name)"/>-->
<!-- Set values if needed -->
<xf:action context="instance('fr-service-request-instance')">
<xf:action class="fr-set-service-value-action">
<!-- Parameters -->
<xf:var name="control-name" value="'car-id'" as="xs:string"/>
<xf:var name="path" value="/request/car-id" as="xs:string"/>
<!-- Set value -->
<xf:setvalue ref="$path" value="instance('edited-job')/job/*[name() = $control-name]"/>
</xf:action>
<xf:action class="fr-set-service-value-action">
<!-- Parameters -->
<xf:var name="control-name" value="'driver-id'" as="xs:string"/>
<xf:var name="path" value="/request/driver-id" as="xs:string"/>
<!-- Set value -->
<xf:setvalue ref="$path" value="instance('edited-job')/job/*[name() = $control-name]"/>
</xf:action>
<xf:action class="fr-set-service-value-action">
<!-- Parameters -->
<xf:var name="control-name" value="'document'" as="xs:string"/>
<xf:var name="path" value="/request/event-id" as="xs:string"/>
<!-- Set value -->
<xf:setvalue ref="$path"
value="xxf:instance('fr-parameters-instance')/*[name() = $control-name]"/>
</xf:action>
<!-- Setvalue actions will be here -->
</xf:action>
</xf:action>
<!-- Response actions -->
<xf:action ev:event="xforms-submit-done" ev:observer="new-job-submission"
context="instance('fr-service-response-instance')">
<!-- Response actions will be here -->
</xf:action>
</xf:action> `
FB に保存した後は次のようになります。
<xf:action id="create-job-binding">
<!-- React to event... on control... -->
<xf:action ev:event="DOMActivate" ev:observer="save-job-control" if="true()">
<!-- Service to call -->
<xf:send submission="new-job-submission"/>
</xf:action>
<!-- Request actions -->
<xf:action ev:event="xforms-submit" ev:observer="new-job-submission">
<!-- Get reference to initial request -->
<xf:var name="request-instance-name" value="'new-job-instance'" as="xs:string"/>
<!-- Copy over to read-write request instance -->
<xf:insert ref="instance('fr-service-request-instance')"
origin="saxon:parse(instance($request-instance-name))"/>
<!--<xf:insert ref="instance('fr-service-request-instance')" origin="instance($request-instance-name)"/>-->
<!-- Set values if needed -->
<xf:action context="instance('fr-service-request-instance')">
<xf:action class="fr-set-service-value-action">
<xf:var name="control-name" value="'car-id'" as="xs:string"/>
<xf:var name="path" value="/request/car-id" as="xs:string"/>
</xf:action>
<xf:action class="fr-set-service-value-action">
<xf:var name="control-name" value="'driver-id'" as="xs:string"/>
<xf:var name="path" value="/request/driver-id" as="xs:string"/>
</xf:action>
<xf:action class="fr-set-service-value-action">
<xf:var name="control-name" value="'document'" as="xs:string"/>
<xf:var name="path" value="/request/event-id" as="xs:string"/>
</xf:action>
<!-- Setvalue actions will be here -->
</xf:action>
</xf:action>
<!-- Response actions -->
<xf:action ev:event="xforms-submit-done" ev:observer="new-job-submission"
context="instance('fr-service-response-instance')">
<!-- Response actions will be here -->
</xf:action>
</xf:action>
setValue コマンドが失われていることに注意してください。
また、次の xf:help 参照を削除しました。
<xh:tr>
<xh:td colspan="2">
<xf:textarea id="pickup-address-control" bind="pickup-address-bind">
<xf:label ref="$form-resources/pickup-address/label"/>
<xf:hint ref="$form-resources/pickup-address/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:textarea>
</xh:td>
<xh:td>
<xf:input id="pickup-postcode-control" bind="pickup-postcode-bind">
<xf:label ref="$form-resources/pickup-postcode/label"/>
<xf:hint ref="$form-resources/pickup-postcode/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</xh:td>
<xh:td>
<xf:textarea id="notes-control" bind="notes-bind">
<xf:label ref="$form-resources/notes/label"/>
<xf:hint ref="$form-resources/notes/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:textarea>
</xh:td>
</xh:tr>