xforms:message action on xforms-submit-error

View: New views
10 Messages — Rating Filter:   Alert me  

xforms:message action on xforms-submit-error

by rssc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I am trying to figure out why an xforms:message I placed in an xforms:action is not showing anything, although the server debug output actually prints that it is handling the action. The code I am using is as follows (edited):

            <xforms:submission id="some-submission" ref="instance('some-instance')" replace="none" method="post" action="/some-path">
                <xforms:action ev:event="xforms-submit-done">
                    <xforms:message ref="instance('resource-instance')/some-message"/>
                </xforms:action>
                <xforms:action ev:event="xforms-submit-error">
                    <xforms:message ref="instance('resource-instance')/some-other-message"/>
                </xforms:action>
            </xforms:submission>

Strangely enough, if "xforms-submit-done" fires, then the message is displayed. If "xforms-submit-error" fires, no message is displayed, although in the server log I find the following:

DEBUG XFormsServer  - XForms - dispatching event:     xforms-submit-error - some-submission - at line 900 of XFormsModelSubmission.java
DEBUG XFormsServer  - XForms - executing action: action
DEBUG XPathCache  - makeObject(instance('resource-instance')/some-other-message)
DEBUG XFormsServer  - XForms - executing action: message
DEBUG XFormsServer  - XForms - submission - total submission time: 424

I don't know if I am missing something obvious here (maybe only one action allowed under "xforms:submission"?), but I just can't figure out the problem here.

Any hints?

Thanks a lot,

Roman


Re: xforms:message action on xforms-submit-error

by Alessandro Vernet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Roman,

On Wed, May 14, 2008 at 1:14 AM, rssc <lists@...> wrote:
>                    <xforms:message
> ref="instance('resource-instance')/some-message"/>

Could you try to add level="modal" on the <xforms:message>, to see if
this solves the issue?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
You receive this message as a subscriber of the ops-users@... mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@...
For general help: mailto:sympa@...?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet

Re: xforms:message action on xforms-submit-error

by rssc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Alex,

Unfortunately it still does not show the message, although the server still prints a DEBUG message that it is handling the action. The message on xforms-submit-done still works, though, even when using the level attribute.

Roman

Alessandro Vernet wrote:
Roman,

On Wed, May 14, 2008 at 1:14 AM, rssc <lists@ione.ch> wrote:
>                    <xforms:message
> ref="instance('resource-instance')/some-message"/>

Could you try to add level="modal" on the <xforms:message>, to see if
this solves the issue?

Alex

Re: xforms:message action on xforms-submit-error

by fs(ops-users) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi Roman,

>                 <xforms:action ev:event="xforms-submit-error">
>                     <xforms:message
> ref="instance('resource-instance')/some-other-message"/>
>                 </xforms:action>

is the xpath pointing to the referenced element correct?

florian




--
You receive this message as a subscriber of the ops-users@... mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@...
For general help: mailto:sympa@...?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

Re: xforms:message action on xforms-submit-error

by rssc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Florian,

That turned out to be the problem. I did not check that again before because I remember copy-pasting the relevant XPath expression, but it seems I afterwards changed the resource file.

My apologies for wasting everybody's time.

Roman


fs(ops-users) wrote:
hi Roman,

>                 <xforms:action ev:event="xforms-submit-error">
>                     <xforms:message
> ref="instance('resource-instance')/some-other-message"/>
>                 </xforms:action>

is the xpath pointing to the referenced element correct?

florian

Re: xforms:message action on xforms-submit-error

by rssc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi again,

While a wrongly referenced element was the problem in one case, I had another case where it did not work, even if I did not reference an element but directly put the text.
I was able to further isolate the problem and it seems that xforms:message does not work if it is called in xforms-submit-error of a submission which itself was called by xforms-ready. If I call the submission from an xforms:trigger it works without problems.

Is this by design that xforms:message cannot be used if it is in the wake of xforms-ready?

Cheers,

Roman

fs(ops-users) wrote:
hi Roman,

>                 <xforms:action ev:event="xforms-submit-error">
>                     <xforms:message
> ref="instance('resource-instance')/some-other-message"/>
>                 </xforms:action>

is the xpath pointing to the referenced element correct?

florian

Re: Re: xforms:message action on xforms-submit-error

by Erik Bruchez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Is this by design that xforms:message cannot be used if it is in the  
> wake of
> xforms-ready?

That can be considered a bug.

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the ops-users@... mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@...
For general help: mailto:sympa@...?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

Re: Re: xforms:message action on xforms-submit-error

by rssc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I see. Do I have to file a bug report somewhere? Is there a workaround I could use in the meantime?

Thanks,

Roman


Erik Bruchez wrote:
> Is this by design that xforms:message cannot be used if it is in the  
> wake of
> xforms-ready?

That can be considered a bug.

-Erik

Re: Re: Re: xforms:message action on xforms-submit-error

by Erik Bruchez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Roman,

I created a bug:

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

As workaround, you could run a script with xxforms:script. This works  
during initialization. Then this script would dispatch back an event  
to the server, and the server would react with xforms:message. Not  
pretty, but workable.

-Erik

On May 15, 2008, at 5:59 PM, rssc wrote:

>
> I see. Do I have to file a bug report somewhere? Is there a  
> workaround I
> could use in the meantime?
>
> Thanks,
>
> Roman
>
>
>
> Erik Bruchez wrote:
>>
>>> Is this by design that xforms:message cannot be used if it is in the
>>> wake of
>>> xforms-ready?
>>
>> That can be considered a bug.
>>
>> -Erik
>>
>>
>
> --
> View this message in context: http://www.nabble.com/xforms%3Amessage-action-on-xforms-submit-error-tp17225912p17265677.html
> Sent from the ObjectWeb OPS - Users mailing list archive at  
> Nabble.com.
>
>
> --
> You receive this message as a subscriber of the ops-users@...  
> mailing list.
> To unsubscribe: mailto:ops-users-unsubscribe@...
> For general help: mailto:sympa@...?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the ops-users@... mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@...
For general help: mailto:sympa@...?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

Re: Re: Re: xforms:message action on xforms-submit-error

by rssc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Erik,

I was able to work around the bug with xxforms:script without problems.

Thanks a lot,

Roman


Erik Bruchez wrote:
Roman,

I created a bug:

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

As workaround, you could run a script with xxforms:script. This works  
during initialization. Then this script would dispatch back an event  
to the server, and the server would react with xforms:message. Not  
pretty, but workable.

-Erik
LightInTheBox - Buy quality products at wholesale price