新しいOrbeon 4.2を使用するように Orbeon をアップグレードしようとしています。しかしswitch case
、ソース コードで使用した に問題があります。ケースを切り替えようとすると問題が発生します。
<xforms:action ev:event="xxforms-invalid" ev:observer="main">
<xforms:toggle case="invalid-form-case" if="instance('main')/current_session/student_module_regn_status = 'Close'"/>
</xforms:action>
<xforms:action ev:event="xxforms-valid" ev:observer="main">
<xforms:toggle case="valid-form-case" if="instance('main')/current_session/student_module_regn_status = 'Open'"/>
</xforms:action>
以下は、スイッチ ケースのコードです。
<xforms:switch>
<xforms:case id="invalid-form-case">
Closed
</xforms:case>
<xforms:case id="valid-form-case">
Open
</xforms:case>
ありがとう
問題を再現する例を次に示します。
<html xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
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:widget="http://orbeon.org/oxf/xml/widget"
xmlns:xdt="http://www.w3.org/2005/02/xpath-datatypes"
xmlns:f="http://orbeon.org/oxf/xml/formatting"
xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>test</title>
<xhtml:link rel="stylesheet" href="/apps/uis-common/css/app-form.css" type="text/css"/>
<xforms:model>
<xforms:instance id="main">
<mains>
<test1>Open</test1>
</mains>
</xforms:instance>
<xforms:action ev:event="xxforms-invalid" ev:observer="main">
<xforms:toggle case="invalid-form-case" if="instance('main')/test1 = 'Close'"/>
</xforms:action>
<xforms:action ev:event="xxforms-valid" ev:observer="main">
<xforms:toggle case="valid-form-case" if="instance('main')/test1 = 'Open'"/>
</xforms:action>
</xforms:model>
</head>
<body dir="ltr">
<div>
<table width="100%" id="wrapper" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<xforms:switch>
<xforms:case id="invalid-form-case">
CLOSE
</xforms:case>
<xforms:case id="valid-form-case">
OPEN
</xforms:case>
</xforms:switch>
</td>
</tr>
</table>
</div>
</body>
</html>
「test1」が開いているため「OPEN」と表示されるはずですが、「test1」が何であれ、「CLOSE」と表示されるだけです