以下是我的表单的实例模型:
<xforms:model id="fr-form-model">
<!-- Main instance -->
<xforms:instance id="fr-form-instance">
<form>
<section-1> <age>20</age> <first-name>Tseveen</first-name>
</section-1>
</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="age-bind" name="age" nodeset="age" />
<xforms:bind id="first-name-bind" nodeset="first-name"
name="first-name" />
</xforms:bind>
</xforms:bind>
<!-- 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"> <section-1>
<age> <label>Age</label> <hint>Years since borning</hint> <help>Substract birth date from current date</help>
<alert>Age is required!</alert> </age> <first-name> <label>First
name</label> <hint>Enter first name</hint> <help>a.k.a given name</help> <alert>First
name is required!</alert> </first-name> </section-1> </resource> </resources>
</xforms:instance>
如您所见,控件绑定到 fr-form-resources 中的资源。
我有一个动作:
<xforms:setvalue
ref="xxforms:instance('fr-form-resources')/resources/resource/section-1/age/label"
value="'Doljin'" />
这个想法是改变控件的标签文本。
在 Orbeon/XForms 中修改绑定资源后如何刷新控件绑定,以便更新可视标签文本?