FormRunner - actions after form submission in Liferay portlet

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

FormRunner - actions after form submission in Liferay portlet

Milen Dyankov
Hi,

I'm experimenting with FormRunner placed in a portlet in Liferay.
I have written my own persistence layer and configured the following properties:

<property as="xs:anyURI"  name="oxf.fr.appserver.uri"                                value="http://localhost:8080/orbeon"/>
<property as="xs:anyURI"  name="oxf.fr.persistence.app.uri.*.*.*"                    value="http://localhost:8080/orbeon-storage/persistence"/>
<property as="xs:string"  name="oxf.fr.detail.buttons.*.*"                           value="save submit workflow-send"/>
<property as="xs:boolean" name="oxf.fr.detail.submit.content-from-persistence.*.*"   value="true"/>
<property as="xs:anyURI"  name="oxf.fr.detail.send.uri.*.*"                          value="http://localhost:8080/web/guest/home" />

When I run my form normally (http://localhost:8080/orbeon/fr/<app-name>/<form-name>/new/) everything runs fine:
*) Click on "Save", saves the form data and "Document saved successfully!" is displayed
*) Click on "Submit" saves the form data and shows confirmation dialog containing the message returned from my persistence layer
*) Click on "Send" saves the form data and redirects to http://localhost:8080/web/guest/home

The very same form but called from inside orbeone's liferay portlet behaves differently.
All keys do the same thing. They do save the form data but no message/dialog is shown nor redirect takes place.


In the beginning I thought it's some JavaScript issue but then I realized the server's response is different:
While in "standalone" it was:

--------------------------------------------------------------------------------
<xxf:event-response xmlns:xxf="http://orbeon.org/oxf/xml/xforms">
        <xxf:dynamic-state>pers:CF2D854D-0CF0-C5E2-9DA3-3D141A6F3263</xxf:dynamic-state>
        <xxf:action>
                <xxf:control-values>
                        <xxf:control id="xf-524" relevant="true" />
                        <xxf:div id="fr-message-success" visibility="visible"/>
                        <xxf:div id="fr-message-none" visibility="hidden"/>
                        <xxf:control id="xf-527">Document saved successfully!</xxf:control>
                        <xxf:control id="xf-529">Document saved successfully!</xxf:control>
                        <xxf:control id="xf-531">Document saved successfully!</xxf:control>
                </xxf:control-values>
<xxf:server-events>X2ztnLbujs+XocNBu3ADXGPWeK9rahjxCt3/nK2ZU/nH6W/ui0vnuzz4WMJTNTvVnc31hfPT3ksFQI5zT3JM8cfSpbi5LYa9glecSYUtYWY4kyGSRBJKAza1BsmLMSNB7zWFN9gOeJIga7MZbUDTQpHqczlRzNaRSxFS1xBMKEqAcsPgroz/0QRFPuJVGxUc9+h4/4BD6/vnqZQIvWxrBa1SksZ2R6LPkt0MlGu6SzyTGQh5E3skEWLteb5Eyh/C2Tl8LeroL75lOv987ymY15Gg1ta0Zdxo1c
                </xxf:server-events>
                <xxf:submission method="POST" replace="all"/>
        </xxf:action>
</xxf:event-response>
--------------------------------------------------------------------------------


in portlet mode it was:


--------------------------------------------------------------------------------
<xxf:event-response xmlns:xxf="http://orbeon.org/oxf/xml/xforms">
        <xxf:dynamic-state>pers:D3C5435A-4D91-A216-7673-920B93AEBABE</xxf:dynamic-state>
        <xxf:action>
                <xxf:control-values/>
        </xxf:action>
</xxf:event-response>
--------------------------------------------------------------------------------


Since the HTTP request is exactly the same (the only difference being element IDs) my guess there is something with PortletExternalContext vs. ServletExternalContext.
I don't have the time to investigate it in more details and can't get rid of the feeling that I'm missing something obvious.
Browsing list's archives I realized I'm not the first person integrating Orbeon with Liferay so I thought I'll ask these two questions:

Is this intended behavior or a bug?
How can one configure orbeon portlet to do something (display a message, redirect to another page) as a result of form submission?



Regards,
Milen Dyankov



--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: FormRunner - actions after form submission in Liferay portlet

Alessandro Vernet
Administrator
Milen,

Milen Dyankov wrote
Since the HTTP request is exactly the same (the only difference being element IDs) my guess there is something with PortletExternalContext vs. ServletExternalContext.
I don't have the time to investigate it in more details and can't get rid of the feeling that I'm missing something obvious.
Browsing list's archives I realized I'm not the first person integrating Orbeon with Liferay so I thought I'll ask these two questions:

Is this intended behavior or a bug?
How can one configure orbeon portlet to do something (display a message, redirect to another page) as a result of form submission?
This sounds like a bug. We fixed a few problems related to running Form Runner in Liferay towards the end of last year, and it was working fine then from what I could tell. But maybe something broke since then? I am not sure, and unfortunately dealing with portal-specific issues is too time consuming for us to be able to that through this mailing list (this is something we do for our clients who have a Development Support plan). You'll let us know if you find a solution to this one!

Alex
Reply | Threaded
Open this post in threaded view
|

Re: Re: FormRunner - actions after form submission in Liferay portlet

Milen Dyankov
Alessandro Vernet wrote:

> Milen,
>
>
> Milen Dyankov wrote:
>> Since the HTTP request is exactly the same (the only difference being
>> element IDs) my guess there is something with PortletExternalContext vs.
>> ServletExternalContext.
>> I don't have the time to investigate it in more details and can't get rid
>> of the feeling that I'm missing something obvious.
>> Browsing list's archives I realized I'm not the first person integrating
>> Orbeon with Liferay so I thought I'll ask these two questions:
>>
>> Is this intended behavior or a bug?
>> How can one configure orbeon portlet to do something (display a message,
>> redirect to another page) as a result of form submission?
>>
>
> This sounds like a bug. We fixed a few problems related to running Form
> Runner in Liferay towards the end of last year, and it was working fine then
> from what I could tell. But maybe something broke since then? I am not sure,
> and unfortunately dealing with portal-specific issues is too time consuming
> for us to be able to that through this mailing list (this is something we do
> for our clients who have a Development Support plan). You'll let us know if
> you find a solution to this one!
>
> Alex
>
Alex,
thanks for quick response.
Since you have customers using Form Runner in Liferay without problems can you provide build number / TAG / commit ID know to be working?
I may than try to investigate the problem further. I have so far tried  "orbeon-dev-3.7.1.200905272119" and custom build based on latest code from Git (30.08.2009).
Both have this problem. I will highly appreciate any hints of what may cause this or where to look first.


Milen



--
Milen Dyankov
Senior IT Architect
AMG.net
A Bull Group Company
ul. Łąkowa 29
90-554 Łódź
tel.: (+48 42) 634 56 57
e-mail: [hidden email]
skype: mdyankov
www.amg.net.pl


Treść niniejszej wiadomości może być poufna. Jeżeli nie jesteście Państwo jej adresatem, to rozprowadzanie lub wykorzystywanie zawartych tu informacji jest zabronione.

This e-mail contains material that is confidential for the sole use of the intended recipient. Any review, reliance or distribution by others or forwarding without express
permission is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.



--
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
OW2 mailing lists service home page: http://www.ow2.org/wws