Can I send a submission after xforms:load?

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

Can I send a submission after xforms:load?

hcr
 
 
    I find a problem with xforms:submission. This is infomation: 
orbeon version: 3.7 beta 1
error type: xxforms-internal-error
example:
    <xhtml:head>
        <xhtml:title>load</xhtml:title>
        <xforms:model>
            <xforms:instance id="receive-all">
                <form xmlns="">
     <data>init</data>
                </form>
            </xforms:instance>
   
   <xforms:submission id="replace-all-submission" method="post"
    ref="instance('receive-all')" 
    replace="all"
    action="replace-all">
    
    <xforms:action ev:event="xforms-submit-error">
     <xforms:message>error type: <xforms:output value="event('error-type')"/></xforms:message>
    </xforms:action>
    
   </xforms:submission> 
      </xforms:model>
    </xhtml:head>
    <xhtml:body>
  <xhtml:h1>load</xhtml:h1>
  <xforms:input ref="instance('receive-all')/data"/>
  <xforms:trigger>
   <xforms:label>replace all</xforms:label>
   <xforms:action ev:event="DOMActivate">
    <xforms:load resource="javascript:alert('ok');"/>
    <xforms:send submission="replace-all-submission"/>
   </xforms:action>
  </xforms:trigger>
   </xhtml:body>
</xhtml:html>
     When click the "replace all" trigger, It will display a error dialog: xxforms-internal-error. If delete xforms:load action from trigger, It will ok. Can I send a submission after xforms:load?
 



[广告] 金秋最关注楼盘-房不胜房

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

view.xhtml (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Can I send a submission after xforms:load?

Alessandro Vernet
Administrator
On Oct 17, 2008, at 7:22 PM, hechengrong wrote:

>      When click the "replace all" trigger, It will display a error  
> dialog: xxforms-internal-error. If delete xforms:load action from  
> trigger, It will ok. Can I send a submission after xforms:load?

You are not supposed to run an <xforms:load> and <xforms:submission  
replace="all"> at the "same time", i.e. in the same sequence of  
actions. And indeed, when you try to run this code, you get the  
following error in the orbeon.log:

Unable to run a two-pass submission and xforms:load within a same  
action sequence

But I am not sure what you are really trying to do here. If you are  
just using the <xforms:load> to display a message, then you can use  
<xforms:message> instead. Is there something you were aiming for that  
you can't do, or is this more of an "academic question"? :)

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 [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
hcr
Reply | Threaded
Open this post in threaded view
|

Re: Re: Can I send a submission after xforms:load?

hcr
    Thank you for help. I just want to send a submission after excuted a javascript. Ok, I can use xxforms:script to excute my javascript, this is right. 
   
 
 
 

在2008-10-18,"Alessandro Vernet" <[hidden email]> 写道:
>On Oct 17, 2008, at 7:22 PM, hechengrong wrote:
>
>>      When click the "replace all" trigger, It will display a error  
>> dialog: xxforms-internal-error. If delete xforms:load action from  
>> trigger, It will ok. Can I send a submission after xforms:load?
>
>You are not supposed to run an  and replace="all"> at the "same time", i.e. in the same sequence of  
>actions. And indeed, when you try to run this code, you get the  
>following error in the orbeon.log:
>
>Unable to run a two-pass submission and xforms:load within a same  
>action sequence
>
>But I am not sure what you are really trying to do here. If you are  
>just using the  to display a message, then you can use  
> instead. Is there something you were aiming for that  
>you can't do, or is this more of an "academic question"? :)
>
>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 [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: Re: Re: Can I send a submission after xforms:load?

Alessandro Vernet
Administrator
On Oct 18, 2008, at 4:18 AM, hechengrong wrote:

>     Thank you for help. I just want to send a submission after  
> excuted a javascript. Ok, I can use xxforms:script to excute my  
> javascript, this is right.

Right, using <xxforms:script> in this case is the way to go.

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