Hi,
I have a problem with OPS. The problem is that "This action causes its child actions to be invoked in the order that they aren't specified in the document". XForms 1.0(Second Edition) is descripted like that:
10.1.1 The action ElementThis action causes its child actions to be invoked in the order that they are specified in the document. Should OPS implement Action Element like XForms1.0(Second Edition) ? If not, How can I invoked actions in the order that they are specified in the document? 昨 天 和 女 友 b u y 疯 了 ! ! ! 年 末 万 种 精 品 大 促 销 , 8 0 万 大 奖 天 天 送 ( 绝 对 保 真 ) -- 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 |
Administrator
|
hechengrong wrote:
> I have a problem with OPS. The problem is that "This action causes > its child actions to be invoked in the order that they aren't > specified in the document". XForms 1.0(Second Edition) is descripted > like that: > > _10.1.1 The action Element_ > > _This action causes its child actions to be invoked in the order > that they are specified in the document._ > > Should OPS implement Action Element like XForms1.0(Second Edition) ? > If not, How can I invoked actions in the order that they are > specified in the document? 1.0. And in fact it usually does, with some exceptions, like when you use xxforms:script, xforms:message, xxforms:show, in other words actions that require sending back information to the client. What's the exact issue you are seeing? -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 [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 |
Hi Erik,
Thank you for your response. Test case is that:
Frist Action: submit a xforms instance A and then replace another xforms instance B;
Second Action: do different action with xforms instance B.
The code is like this:
<html>
<head>
<xforms:instance id="send">
<form xmlns=""/>
</xforms:instance>
<xforms:instance id="return">
<form xmlns="">
<return-value/>
</form>
</xforms:instance>
<xforms:submit id="service"
ref="instance('send')"
replace="instance"
instance="instance('return')" .../>
</head>
<body>
<xforms:trigger>
<xforms:label>Action Test</xforms:label>
<xforms:action ev:event="DOMActivate">
<xforms:send submission="service"/>
<xforms:action if="instance('return')/return-value = 'true'">
<xxforms:script>
alert("if return-value='true', then...");
</xxforms:script>
</xforms:action>
<xforms:action if="instance('return')/return-value = 'false'">
<xxforms:script>
alert("if return-value='false', then...");
</xxforms:script> </xforms:action> </xforms:action> </xforms:trigger>
</body>
</html>
hechengrong wrote: > I have a problem with OPS. The problem is that "This action causes > its child actions to be invoked in the order that they aren't > specified in the document". XForms 1.0(Second Edition) is descripted > like that: > > _10.1.1 The action Element_ > > _This action causes its child actions to be invoked in the order > that they are specified in the document._ > > Should OPS implement Action Element like XForms1.0(Second Edition) ? > If not, How can I invoked actions in the order that they are > specified in the document? Yes, Orbeon Forms should implement action as specified in XForms 1.0. And in fact it usually does, with some exceptions, like when you use xxforms:script, xforms:message, xxforms:show, in other words actions that require sending back information to the client. What's the exact issue you are seeing? -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ 昨 天 和 女 友 b u y 疯 了 ! ! ! 年 末 万 种 精 品 大 促 销 , 8 0 万 大 奖 天 天 送 ( 绝 对 保 真 ) -- 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 |
In reply to this post by Erik Bruchez
Hi.
Another Test Case is this:
<html>
<head>
<title>Test Action Order</title> <xforms:model id="model"> <xforms:instance id="test-action-order">
<form xmlns=""> <dest/> <src/> </form> </xforms:instance> </xforms:model> </head> <body> <h1>Test Action Order</h1> <xforms:trigger> <xforms:label>Copy</xforms:label> <xforms:action ev:event="DOMActivate"> <xxforms:script> alert('pre copy'); </xxforms:script> <xforms:setvalue ref="instance('test-action-order')/dest" value="../src"/>
<xxforms:script> alert('after copy'); </xxforms:script> </xforms:action> </xforms:trigger> <xforms:input ref="instance('test-action-order')/src"> <xforms:label>Src: </xforms:label> </xforms:input> <xforms:output ref="instance('test-action-order')/dest"> <xforms:label>Dest: </xforms:label> </xforms:output> </body> </html> I think the order of actions is: alert('pre copy'); setvalue, alert('after copy'), but in fact the order of actions is: setvalue; alert('pre copy'); alert('after copy').
hechengrong wrote: > I have a problem with OPS. The problem is that "This action causes > its child actions to be invoked in the order that they aren't > specified in the document". XForms 1.0(Second Edition) is descripted > like that: > > _10.1.1 The action Element_ > > _This action causes its child actions to be invoked in the order > that they are specified in the document._ > > Should OPS implement Action Element like XForms1.0(Second Edition) ? > If not, How can I invoked actions in the order that they are > specified in the document? Yes, Orbeon Forms should implement action as specified in XForms 1.0. And in fact it usually does, with some exceptions, like when you use xxforms:script, xforms:message, xxforms:show, in other words actions that require sending back information to the client. What's the exact issue you are seeing? -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ 昨 天 和 女 友 b u y 疯 了 ! ! ! 年 末 万 种 精 品 大 促 销 , 8 0 万 大 奖 天 天 送 ( 绝 对 保 真 ) -- 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 |
Administrator
|
In reply to this post by hcr
On 12/25/06, hechengrong <[hidden email]> wrote:
> Thank you for your response. Test case is that: > Frist Action: submit a xforms instance A and then replace another xforms > instance B; > Second Action: do different action with xforms instance B. Keep in mind that the xxforms:script actions will be executed after all the other actions. But in the code below they appear at the end of the action sequence anyway, so that should not make a different, right? > <xforms:action ev:event="DOMActivate"> > <xforms:send submission="service"/> > <xforms:action > if="instance('return')/return-value = 'true'"> > <xxforms:script> > alert("if return-value='true', then..."); > </xxforms:script> > </xforms:action> > > <xforms:action > if="instance('return')/return-value = 'false'"> > > <xxforms:script> > alert("if return-value='false', then..."); > </xxforms:script> > </xforms:action> </xforms:action> that doesn't work for you right now? 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 |
Hi.
I want to do that:
1. open a modal dialog to show some message, then return 'true' or 'false';
2. it will not do any thing when return value of dialog is 'false'; it will jump another page when return value of dialog is 'true'.
so the action is like that:
<xforms:trigger>
<xforms:label></xforms:label>
<xforms:action ev:event="DOMActivate">
<xforms:dialog .../>
<xforms:action if="instance('..')/return-value = 'true'">
<xforms:send submission="jump-another-page"/>
</xforms:action>
<xforms:action if="instance('..')/return-value = 'false'">
<!--not do any thing-->
</xforms:action> </xforms:action>
</xforms:trigger>
On 12/25/06, hechengrong <[hidden email]> wrote: > Thank you for your response. Test case is that: > Frist Action: submit a xforms instance A and then replace another xforms > instance B; > Second Action: do different action with xforms instance B. Keep in mind that the xxforms:script actions will be executed after all the other actions. But in the code below they appear at the end of the action sequence anyway, so that should not make a different, right? > <xforms:action ev:event="DOMActivate"> > <xforms:send submission="service"/> > <xforms:action > if="instance('return')/return-value = 'true'"> > <xxforms:script> > alert("if return-value='true', then..."); > </xxforms:script> > </xforms:action> > > <xforms:action > if="instance('return')/return-value = 'false'"> > > <xxforms:script> > alert("if return-value='false', then..."); > </xxforms:script> > </xforms:action> </xforms:action> Do you have something particular in mind that you are trying to do and that doesn't work for you right now? Alex -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ 昨 天 和 女 友 b u y 疯 了 ! ! ! 年 末 万 种 精 品 大 促 销 , 8 0 万 大 奖 天 天 送 ( 绝 对 保 真 ) -- 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 |
Hi All,
I'm working on a form which requires multiple background post submissions, i.e. <xforms:submission id="submission1" replace="instance" instance="response-message1"> ... </xforms:submission> <xforms:submission id="submission2" replace="instance" instance="response-message2"> ... </xforms:submission> I'd like to invoke a specific action in response to each submission, so I write <xforms:action ev:event="xforms-submit-done" ev:observer="submission1"> .... </xforms:action> <xforms:action ev:event="xforms-submit-done" ev:observer="submission2"> .... </xforms:action> I'd expect that the first action gets invoked in response to submission1 and likewise the second action gets invoked in response to submission2 ... however, the behavior I'm seeing is that both actions get invoked. Orbeon Forms appears to be ignoring the ev:observer tag? Is this not supported, or a bug, or I'm I doing something wrong? Larry T. Chen Sr. Software Engineer Intelenet Communications, Inc. -- 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 |
Administrator
|
In reply to this post by hcr
On 12/26/06, hechengrong <[hidden email]> wrote:
> I want to do that: > 1. open a modal dialog to show some message, then return 'true' or 'false'; > 2. it will not do any thing when return value of dialog is 'false'; it will > jump another page when return value of dialog is 'true'. Here is how I would do this: 1. Put the question you want to ask in an <xxforms:dialog>. 2. When you want to ask the question show the dialog with <xxforms:show/>. 3. In the dialog: 3.1. When the user answers the question with "true" (assuming for instance that you have two buttons Yes/No), run the <xforms:send> or <xforms:load> to go to another page. 3.2. When the user answers with "false", close the dialog with the <xxforms:hide> action. 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 |
Administrator
|
In reply to this post by Larry T. Chen
Hi Larry,
We do not support yet ev:observer. In you case, you can achieve the same goal by putting the actions inside the relevant <xforms:submission>. For instance: <xforms:submission id="submission1"> <xforms:action ev:event="xforms-submit-done"> <!-- Sequence of actions you want to perform when the submission1 is done --> </xforms:action> </xforms:submission> Alex On 12/26/06, Larry T. Chen <[hidden email]> wrote: > Hi All, > > I'm working on a form which requires multiple background post > submissions, i.e. > > <xforms:submission id="submission1" replace="instance" > instance="response-message1"> ... </xforms:submission> > <xforms:submission id="submission2" replace="instance" > instance="response-message2"> ... </xforms:submission> > > I'd like to invoke a specific action in response to each submission, so > I write > > <xforms:action ev:event="xforms-submit-done" ev:observer="submission1"> > .... </xforms:action> > <xforms:action ev:event="xforms-submit-done" ev:observer="submission2"> > .... </xforms:action> > > I'd expect that the first action gets invoked in response to submission1 > and likewise the second action gets invoked in response to submission2 > ... however, the behavior I'm seeing is that both actions get invoked. > Orbeon Forms appears to be ignoring the ev:observer tag? > > Is this not supported, or a bug, or I'm I doing something wrong? > > Larry T. Chen > Sr. Software Engineer > Intelenet Communications, Inc. > > > > > > > > > -- > 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 |
In reply to this post by Alessandro Vernet
Thank you very much. I will try it!
On 12/26/06, hechengrong <[hidden email]> wrote: > I want to do that: > 1. open a modal dialog to show some message, then return 'true' or 'false'; > 2. it will not do any thing when return value of dialog is 'false'; it will > jump another page when return value of dialog is 'true'. Here is how I would do this: 1. Put the question you want to ask in an <xxforms:dialog>. 2. When you want to ask the question show the dialog with <xxforms:show/>. 3. In the dialog: 3.1. When the user answers the question with "true" (assuming for instance that you have two buttons Yes/No), run the <xforms:send> or <xforms:load> to go to another page. 3.2. When the user answers with "false", close the dialog with the <xxforms:hide> action. Alex -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ 昨 天 和 女 友 b u y 疯 了 ! ! ! 年 末 万 种 精 品 大 促 销 , 8 0 万 大 奖 天 天 送 ( 绝 对 保 真 ) -- 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 |
Administrator
|
In reply to this post by Larry T. Chen
Larry T. Chen wrote:
> Is this not supported, or a bug, or I'm I doing something wrong? As Alex said, this is not yet supported. We should definitely support it of course as it is part of XML Events! -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 [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 |
Free forum by Nabble | Edit this page |