0
檢查並有結合對反應變化Orbeon的XForms有效輸入與相關的屬性
<xforms:bind nodeset="instance('request')/SOAP-ENV:Body/request">
<xforms:bind nodeset="request">
<xforms:bind nodeset="fromDate" type="xforms:date" id="bind_fromDate" />
<xforms:bind nodeset="toDate" type="xforms:date" id="bind_toDate" />
<xforms:bind nodeset="hoursperweek" type="xforms:int" id="bind_hoursperweek" />
</xforms:bind>
並且還按鈕可變
<xforms:instance id="buttons">
<buttons>
<submitbutton />
</buttons>
</xforms:instance>
而且我顯示按鈕,如果所有的輸入都充滿
<xforms:bind nodeset="instance('buttons')">
<xforms:bind id="bind_savebutton" nodeset="submitbutton" relevant ="
instance('request')/SOAP-ENV:Body/request/fromDate != '' and
instance('request')/SOAP-ENV:Body/request/toDate != '' and
instance('request')/SOAP-ENV:Body/request/hoursperweek != '' " />
而且在身體標籤上有一個輸入的小表格
<xforms:group ref="instance('request')">
<xforms:input ref="fromDate" bind="bind_fromDate">
<xforms:label>Start date</xforms:label>
</xforms:input>
<xforms:input ref="toDate" bind="bind_toDate">
<xforms:label>End date</xforms:label>
</xforms:input>
<xforms:input ref="hoursperweek" bind="bind_hoursperweek">
<xforms:label>Hrs.</xforms:label>
</xforms:input>
<xforms:trigger bind="bind_savebutton">
<xforms:label>Save</xforms:label>
</xforms:trigger>
</xforms:group>
但如何檢查相關表達式,如果日期是「WronDate」而不是「2013-12-14」? 如何查看hoursperweek是「非數字串」還是「23.3」而不是正整數,例如「40」?並且可以檢查開始日期是否早於結束日期?還綁定了更改事件而不是「鼠標懸停」事件?
謝謝
你是什麼意思的「綁定在改變事件,而不是」鼠標「事件」? – ebruchez
我的意思是按鍵或更改事件。 – user2301515