javascritpt launching events of different models

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

javascritpt launching events of different models

victor panizza-2
Hello all, .

I have the follow Javascript:

function loadList(){         ORBEON.xforms.Document.dispatchEvent("id-4","do-something");
}
In the same file I have some xi:include, that just include a couple of models each one with it's own id (id-1, id-2, ....). The include looks like:

<xi:include
href="oxf:/apps/sample/model2.xml"
xxi:omit-xml-base="true" />
<xi:include
href
="oxf:/apps/sample/model1.xml"
xxi:omit-xml-base
="true" />          
<xi:include
href="oxf:/apps/sample/model3.xml"
xxi:omit-xml-base="true" /> 


The event that should be fired are in the href="oxf:/apps/sample/model3.xml", but it is not invoked by orbeon. The only way to successfully invoke it is push the xi:include for href="oxf:/apps/sample/model3.xml" to the top, like this:

<xi:include
href="oxf:/apps/sample/model3.xml"
xxi:omit-xml-base="true" /> 
<xi:include
href
="oxf:/apps/sample/model2.xml"
xxi:omit-xml-base
="true" />

<xi:include
href
="oxf:/apps/sample/model1.xml"
xxi:omit-xml-base
="true" />          

The question is, how can I do to define in the javascript invocation that search or try to find the events in all the included models??? It just search in the first one..
Any Idea, thanks a lot!!!


Need a vacation? Get great deals to amazing places on Yahoo! Travel.

--
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
|

JavaScript launching events of different models

victor panizza-2
Hello all, a few days ago I post the follow message.
But, no answer was posted :-( _ _ _
Again, if anyone has been working on this issue or know how can I do it, just let me know!! just a clue!!!!
Thanks in Advance

I have the follow Javascript:

function loadList(){          
       
ORBEON.xforms.Document.dispatchEvent("id-4","do-something" );
}

In the same file I have some xi:include, that just include a couple of models each one with it's own id (id-1, id-2, ....). The includes looks like:

<xi:include
href="oxf:/apps/sample/model2.xml"
xxi:omit-xml-base="true" />
<xi:include
href
="oxf:/apps/sample/model1.xml"
xxi:omit-xml-base
="true" />          
<xi:include
href="oxf:/apps/sample/model3.xml"
xxi:omit-xml-base="true" /> 


The event that should be fired are in the href="oxf:/apps/sample/model3.xml", but it is not invoked by Orbeon. The only way to successfully invoke it is push the xi:include for href="oxf:/apps/sample/model3.xml" to the top, like this:

<xi:include
href="oxf:/apps/sample/model3.xml"
xxi:omit-xml-base="true" /> 
<xi:include
href
="oxf:/apps/sample/model2.xml"
xxi:omit-xml-base
="true" />

<xi:include
href
="oxf:/apps/sample/model1.xml"
xxi:omit-xml-base
="true" />          


Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.

--
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: javascritpt launching events of different models

Alessandro Vernet
Administrator
In reply to this post by victor panizza-2
Hi Victor,

On 8/23/07, victor panizza <[hidden email]> wrote:

>
> function loadList(){
> ORBEON.xforms.Document.dispatchEvent("id-4","do-something");
> }In the same file I have some xi:include, that just include a couple of
> models each one with it's own id (id-1, id-2, ....). The include looks like:
>
>
> <xi:include
> href="oxf:/apps/sample/model2.xml"
> xxi:omit-xml-base="true" /><xi:include
> href="oxf:/apps/sample/model1.xml"
> xxi:omit-xml-base="true" />
> <xi:include
> href="oxf:/apps/sample/model3.xml"
> xxi:omit-xml-base="true" />
>
> The event that should be fired are in the
> href="oxf:/apps/sample/model3.xml", but it is not invoked by orbeon. The
> only way to successfully invoke it is push the xi:include for
> href="oxf:/apps/sample/model3.xml" to the top, like this:
>
> <xi:include
>  href="oxf:/apps/sample/model3.xml"
>  xxi:omit-xml-base="true" />  <xi:include
> href="oxf:/apps/sample/model2.xml"
> xxi:omit-xml-base="true" />
>
> <xi:include
>  href="oxf:/apps/sample/model1.xml"
>  xxi:omit-xml-base="true" />
>
> The question is, how can I do to define in the javascript invocation that
> search or try to find the events in all the included models??? It just
> search in the first one..
I tried to create an example to reproduce this, but I wasn't able to
do so. See the attached example, which runs in the XForms sandbox. See
how I am running
ORBEON.xforms.Document.dispatchEvent("model-2","my-event") to send an
event to the second model. That event gets to the second model as
expected. If you are still having this problem, could you attach a
test case that we can run in the XForms sandbox.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/


--
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

action-load-target.xhtml (1K) Download Attachment