Hello Efraim,
Oops! While adding the unload action for sub-forms, I accidentally
erased the include command for the toggle action...
BTW, I modified the test case so it can run with rev. 516:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events">
<head>
<title>Toggle</title>
<xf:model>
<xf:instance id="data">
<data xmlns="">
<one>1</one>
<two>2</two>
</data>
</xf:instance>
</xf:model>
</head>
<body>
<div>
<xf:switch>
<xf:case id="one">
<xf:output ref="one"/>
</xf:case>
<xf:case id="two">
<xf:output ref="two"/>
</xf:case>
</xf:switch>
<xf:trigger>
<xf:label>ONE</xf:label>
<xf:toggle ev:event="DOMActivate" case="one"/>
</xf:trigger>
<xf:trigger>
<xf:label>TWO</xf:label>
<xf:toggle ev:event="DOMActivate" case="two"/>
</xf:trigger>
</div>
</body>
</html>
Thanks!
-Alain
Le 15/11/2011 07:07, Efraim Feinstein a écrit :
> Hi,
>
> In recent XSLTForms (at least since r514), use of xf:toggle results in
> an error on page load:
> XSLTForms Exception
> --------------------------
>
> Error initializing :
>
> ReferenceError: XsltForms_toggle is not defined
> at xsltforms_initImpl (http://localhost:8080/test-toggle.xql:27:30)
> at xsltforms_init (http://localhost:8080/test-toggle.xql:60:1)
> at http://localhost:8080/test-toggle.xql:65:295
> at onload (http://localhost:8080/test-toggle.xql:66:4)
>
> ReferenceError
>
> XsltForms_toggle is not defined
>
> A simple test form that demonstrates the error is below:
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:xf="http://www.w3.org/2002/xforms"
> xmlns:ev="http://www.w3.org/2001/xml-events">
> <head>
> <title>Toggle</title>
> <xf:model>
> <xf:instance id="data">
> <data xmlns="http://www.w3.org/1999/xhtml">
> <one>1</one>
> <two>2</two>
> </data>
> </xf:instance>
> </xf:model>
> </head>
> <body>
> <div>
> <xf:switch>
> <xf:case id="one">
> <xf:output ref="/one"/>
> </xf:case>
> <xf:case id="two">
> <xf:output ref="/two"/>
> </xf:case>
> </xf:switch>
> <xf:trigger>
> <xf:label>ONE</xf:label>
> <xf:toggle case="one"/>
> </xf:trigger>
> <xf:trigger>
> <xf:label>TWO</xf:label>
> <xf:toggle case="two"/>
> </xf:trigger>
> </div>
> </body>
> </html>
>
> Thanks,
>
|