"ORBEON.xforms.Document.dispatchEvent" pr oblem

classic Classic list List threaded Threaded
4 messages Options
hcr
Reply | Threaded
Open this post in threaded view
|

"ORBEON.xforms.Document.dispatchEvent" pr oblem

hcr
Hi,
   I want to use ORBEON.xforms.Document.dispatchEvent in javascript. The segment is that:
 
    <xhtml:head>
        <xhtml:title>Custom EVents</xhtml:title>
        <xforms:model id="main-model" xxforms:external-events="acme-super-event erik-test">
            <xforms:message ev:event="acme-super-event" level="modal">Hi there!</xforms:message>
            <xforms:action ev:event="xforms-ready">
                <xforms:setfocus control="my-input"/>
                <xxforms:script>
                    ORBEON.xforms.Document.dispatchEvent("main-model", "acme-super-event");
                </xxforms:script>
            </xforms:action>
            <xforms:instance id="instance">
                <instance>abc</instance>
            </xforms:instance>
        </xforms:model>
    </xhtml:head>
    <xhtml:body>
        <xforms:input ref="." id="my-input"/>
    </xhtml:body>
</xhtml:html>
  But it does not show the message when I open this page? Why?
  
 
 
 







你 邮 箱 里 居 然 有 积 分 , 这 你 知 道 吗 ?
邮 箱 积 分 居 然 能 换 20 元 钱 , 这 你 也 知 道 吗 ? 点 此 兑 换 20 元 >>

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: "ORBEON.xforms.Document.dispatchEvent" pr oblem

Alessandro  Vernet
Administrator
Hi,

Your example works for me: I can see the "Hi there" message". Have you
tried this in the XForms sandbox? If it does not work for you in the
sandbox, you might want to try to upgrade your Orbeon Forms with the
latest nightly build from:

http://forge.objectweb.org/nightlybuilds/ops/ops/

Alex

On 11/14/06, hechengrong <[hidden email]> wrote:

> Hi,
>    I want to use ORBEON.xforms.Document.dispatchEvent in
> javascript. The segment is that:
>
> <xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
>     xmlns:f="http://orbeon.org/oxf/xml/formatting"
>     xmlns:xhtml="http://www.w3.org/1999/xhtml"
>     xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>     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:ev="http://www.w3.org/2001/xml-events"
>     xmlns:xs="http://www.w3.org/2001/XMLSchema"
>     xmlns:xdt="http://www.w3.org/2005/xpath-datatypes">
>     <xhtml:head>
>         <xhtml:title>Custom EVents</xhtml:title>
>         <xforms:model id="main-model"
> xxforms:external-events="acme-super-event erik-test">
>             <xforms:message ev:event="acme-super-event" level="modal">Hi
> there!</xforms:message>
>             <xforms:action ev:event="xforms-ready">
>                 <xforms:setfocus control="my-input"/>
>                 <xxforms:script>
>
> ORBEON.xforms.Document.dispatchEvent("main-model",
> "acme-super-event");
>                 </xxforms:script>
>             </xforms:action>
>             <xforms:instance id="instance">
>                 <instance>abc</instance>
>             </xforms:instance>
>         </xforms:model>
>     </xhtml:head>
>     <xhtml:body>
>         <xforms:input ref="." id="my-input"/>
>     </xhtml:body>
> </xhtml:html>
>
>   But it does not show the message when I open this page? Why?
>
>
>
>
>
>
>
>
>
>
>  你 邮 箱 里 居 然 有 积 分 , 这 你 知 道 吗 ?
>  邮 箱 积 分 居 然 能 换 20 元 钱 , 这 你 也 知 道 吗 ? 点 此 兑 换 20 元 >>
>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
hcr
Reply | Threaded
Open this post in threaded view
|

Re: Re: "ORBEON.xforms.Docume nt.dispatchEvent" pr oblem

hcr
 
Hi, Alessandro Vernet


   thank you very much for the quick help, now it works fine.
 
 
 
在2006-11-15,"Alessandro Vernet" <[hidden email]> 写道:
Hi,

Your example works for me: I can see the "Hi there" message". Have you
tried this in the XForms sandbox? If it does not work for you in the
sandbox, you might want to try to upgrade your Orbeon Forms with the
latest nightly build from:

http://forge.objectweb.org/nightlybuilds/ops/ops/

Alex

On 11/14/06, hechengrong <[hidden email]> wrote:
> Hi,
>    I want to use ORBEON.xforms.Document.dispatchEvent in
> javascript. The segment is that:
>
> <xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
>     xmlns:f="http://orbeon.org/oxf/xml/formatting"
>     xmlns:xhtml="http://www.w3.org/1999/xhtml"
>     xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>     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:ev="http://www.w3.org/2001/xml-events"
>     xmlns:xs="http://www.w3.org/2001/XMLSchema"
>     xmlns:xdt="http://www.w3.org/2005/xpath-datatypes">
>     <xhtml:head>
>         <xhtml:title>Custom EVents</xhtml:title>
>         <xforms:model id="main-model"
> xxforms:external-events="acme-super-event erik-test">
>             <xforms:message ev:event="acme-super-event" level="modal">Hi
> there!</xforms:message>
>             <xforms:action ev:event="xforms-ready">
>                 <xforms:setfocus control="my-input"/>
>                 <xxforms:script>
>
> ORBEON.xforms.Document.dispatchEvent("main-model",
> "acme-super-event");
>                 </xxforms:script>
>             </xforms:action>
>             <xforms:instance id="instance">
>                 <instance>abc</instance>
>             </xforms:instance>
>         </xforms:model>
>     </xhtml:head>
>     <xhtml:body>
>         <xforms:input ref="." id="my-input"/>
>     </xhtml:body>
> </xhtml:html>
>
>   But it does not show the message when I open this page? Why?
>
>
>
>
>
>
>
>
>
>
>  你 邮 箱 里 居 然 有 积 分 , 这 你 知 道 吗 ?
>  邮 箱 积 分 居 然 能 换 20 元 钱 , 这 你 也 知 道 吗 ? 点 此 兑 换 20 元 >>
>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: [hidden email]
> For general help: [hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>


-- 
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/







你 邮 箱 里 居 然 有 积 分 , 这 你 知 道 吗 ?
邮 箱 积 分 居 然 能 换 20 元 钱 , 这 你 也 知 道 吗 ? 点 此 兑 换 20 元 >>

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: "ORBEON.xforms.Docume nt.dispatchEvent" pr oblem

Alessandro  Vernet
Administrator
On 11/15/06, hechengrong <[hidden email]> wrote:
>    thank you very much for the quick help, now it works fine.

Excellent, I am glad to read this!

Alex
--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet