Event Handling for Multiple Orbeon Portlets

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

Event Handling for Multiple Orbeon Portlets

Leray Eric
As an evaluation of Orbeon usage for Portlets in Liferay, we are trying to achieve the following:
Having multiple Orbeons' ( Portlets deployed within the same jar onto a Liferay Portal Server (4.3) with Jboss (4.0.4).

We have achieved this by slightly changing the prologue-portlet.xpl and using a preference to determine which orbeon's appli (multiple application per war archive) to run in the portlet container. Furthermore we have also managed to get portlet interaction working with Dojo Publish/Subscribe mechanisms.
However we have now hit a possible bug (?) within the way Orbeon handle event processing.

Here is the problem we identified in the xforms.js Javascript file.

in the executeNextRequest: function(bypassRequestQueue) function, there is an assumption taken that the asynchronous request is only done for the form of the first event only.

## extract from xform.js
...
// Save the form for this request
ORBEON.xforms.Globals.requestForm = ORBEON.xforms.Globals.eventQueue[0].form;
var formID = ORBEON.xforms.Globals.requestForm.id;
...
##

In our case, since we have multiple orbeons application (only one war deployed) that need to react (via dojo subscription) to portlet interactions,  we queue multiple value-change events for multiple Orbeons' application (each in a separate portlet), thus for multiple Orbeons' form.
With firebug, we can clearly see that since only the form of the first eventQueue element is kept, then later in the script the events "attached" to other orbeons' forms are not processed.

## extract from xform.js
// Only handle this event if it is for the form we chose
if (ORBEON.xforms.Controls.getForm(event.form) == ORBEON.xforms.Globals.requestForm)
##

any idea if this is a bug or a limitation that prevent multiple events on multiple orbeons' form to be processed in a portal environnement ?

Thanks for the information you could provide on this.

- Eric



--
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: Event Handling for Multiple Orbeon Portlets

Erik Bruchez
Administrator
Hi Eric,

The first thing to ask is whether you are using a recent build. Just a
couple of weeks ago we fixed this bug which could be relevant:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=307367&group_id=168&atid=350207

-Erik

[hidden email] wrote:

> As an evaluation of Orbeon usage for Portlets in Liferay, we are trying to achieve the following:
> Having multiple Orbeons' ( Portlets deployed within the same jar onto a Liferay Portal Server (4.3) with Jboss (4.0.4).
>
> We have achieved this by slightly changing the prologue-portlet.xpl and using a preference to determine which orbeon's appli (multiple application per war archive) to run in the portlet container. Furthermore we have also managed to get portlet interaction working with Dojo Publish/Subscribe mechanisms.
> However we have now hit a possible bug (?) within the way Orbeon handle event processing.
>
> Here is the problem we identified in the xforms.js Javascript file.
>
> in the executeNextRequest: function(bypassRequestQueue) function, there is an assumption taken that the asynchronous request is only done for the form of the first event only.
>
> ## extract from xform.js
> ...
> // Save the form for this request
> ORBEON.xforms.Globals.requestForm = ORBEON.xforms.Globals.eventQueue[0].form;
> var formID = ORBEON.xforms.Globals.requestForm.id;
> ...
> ##
>
> In our case, since we have multiple orbeons application (only one war deployed) that need to react (via dojo subscription) to portlet interactions,  we queue multiple value-change events for multiple Orbeons' application (each in a separate portlet), thus for multiple Orbeons' form.
> With firebug, we can clearly see that since only the form of the first eventQueue element is kept, then later in the script the events "attached" to other orbeons' forms are not processed.
>
> ## extract from xform.js
> // Only handle this event if it is for the form we chose
> if (ORBEON.xforms.Controls.getForm(event.form) == ORBEON.xforms.Globals.requestForm)
> ##
>
> any idea if this is a bug or a limitation that prevent multiple events on multiple orbeons' form to be processed in a portal environnement ?
>
> Thanks for the information you could provide on this.
>
> - Eric
>
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
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
Reply | Threaded
Open this post in threaded view
|

RE : Event Handling for Multiple Orbeon Portlets

Leray Eric
In reply to this post by Leray Eric
Hello Erik (with a k :-)

Our initial tests were done with Orbeon 3.5, we also tried with Orbeon nightly build, but encountered the same problem.

ie: although in xform.js we noticed some changes, the line I mentioned in my previous mail is still the source of our problems:

 // Only handle this event if it is for the form we chose
if (ORBEON.xforms.Controls.getForm(event.form) == ORBEON.xforms.Globals.requestForm)

where in the script (L2016 in Firebug for xform-min.js) the "ORBEON.xforms.Globals.requestForm" is previously defined as the form of the first event in the eventQueue.

Again picking up a "unique" acceptable (L2064 in Firebug for xform-min.js) form means that if there is more than one form on which events should be processed, it works only for the event of this picked form.

I hope this clarify our problem, and still keep the faith that there is a solution to this multiple orbeon's portlets problem.

Eric

PS: I wonder if this is not linked with a recent post in the list:
http://www.objectweb.org/wws/arc/ops-users/2007-08/msg00205.html


-----Message d'origine-----
De : Erik Bruchez [mailto:[hidden email]] De la part de Erik Bruchez
Envoyé : mardi, 28. août 2007 13:21
À : [hidden email]
Objet : Re: [ops-users] Event Handling for Multiple Orbeon Portlets

Hi Eric,

The first thing to ask is whether you are using a recent build. Just a
couple of weeks ago we fixed this bug which could be relevant:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=307367&group_id=168&atid=350207

-Erik

[hidden email] wrote:

> As an evaluation of Orbeon usage for Portlets in Liferay, we are trying to achieve the following:
> Having multiple Orbeons' ( Portlets deployed within the same jar onto a Liferay Portal Server (4.3) with Jboss (4.0.4).
>
> We have achieved this by slightly changing the prologue-portlet.xpl and using a preference to determine which orbeon's appli (multiple application per war archive) to run in the portlet container. Furthermore we have also managed to get portlet interaction working with Dojo Publish/Subscribe mechanisms.
> However we have now hit a possible bug (?) within the way Orbeon handle event processing.
>
> Here is the problem we identified in the xforms.js Javascript file.
>
> in the executeNextRequest: function(bypassRequestQueue) function, there is an assumption taken that the asynchronous request is only done for the form of the first event only.
>
> ## extract from xform.js
> ...
> // Save the form for this request
> ORBEON.xforms.Globals.requestForm = ORBEON.xforms.Globals.eventQueue[0].form;
> var formID = ORBEON.xforms.Globals.requestForm.id;
> ...
> ##
>
> In our case, since we have multiple orbeons application (only one war deployed) that need to react (via dojo subscription) to portlet interactions,  we queue multiple value-change events for multiple Orbeons' application (each in a separate portlet), thus for multiple Orbeons' form.
> With firebug, we can clearly see that since only the form of the first eventQueue element is kept, then later in the script the events "attached" to other orbeons' forms are not processed.
>
> ## extract from xform.js
> // Only handle this event if it is for the form we chose
> if (ORBEON.xforms.Controls.getForm(event.form) == ORBEON.xforms.Globals.requestForm)
> ##
>
> any idea if this is a bug or a limitation that prevent multiple events on multiple orbeons' form to be processed in a portal environnement ?
>
> Thanks for the information you could provide on this.
>
> - Eric
>
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
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
Reply | Threaded
Open this post in threaded view
|

Re: Event Handling for Multiple Orbeon Portlets

Alessandro Vernet
Administrator
In reply to this post by Leray Eric
Eric,

First, from the code you are quoting, you seem to be using a recent
nightly build of Orbeon Forms. This is a good thing, since we fixed
some issues related to portlets (in particular in Liferay) a few weeks
ago. (More comments below)

On 8/26/07, [hidden email] <[hidden email]> wrote:
> However we have now hit a possible bug (?) within the way Orbeon handle event processing.
>
> Here is the problem we identified in the xforms.js Javascript file.
>
> in the executeNextRequest: function(bypassRequestQueue) function, there is an assumption taken that the asynchronous request is only done for the form of the first event only.

No exactly (more below).

> ## extract from xform.js
> ...
> // Save the form for this request
> ORBEON.xforms.Globals.requestForm = ORBEON.xforms.Globals.eventQueue[0].form;
> var formID = ORBEON.xforms.Globals.requestForm.id;
> ...
> ##

There is one HTML form on the page per XForms portlet. At one point in
time you will have at most one Ajax request from all the XForms
portlets to the server. Here we store in
ORBEON.xforms.Globals.requestForm a reference to the form that is
making that request, so when the response comes back we know which
form has to be updated.

> In our case, since we have multiple orbeons application (only one war deployed) that need to react (via dojo subscription) to portlet interactions,  we queue multiple value-change events for multiple Orbeons' application (each in a separate portlet), thus for multiple Orbeons' form.
> With firebug, we can clearly see that since only the form of the first eventQueue element is kept, then later in the script the events "attached" to other orbeons' forms are not processed.

What can we do to reproduce this issue? Do you see the problem if you
simply add multiple portlets with the unmodified war file?

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