XForms error: xforms:submit requires a submission attribute.

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

XForms error: xforms:submit requires a submission attribute.

assafn
Hi,

I have a simple form that I wish to submit but I keep getting the above error when clicking on the submit button

<xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
            xmlns:xhtml="http://www.w3.org/1999/xhtml"
                        xmlns:xi="http://www.w3.org/2001/XInclude"
                xmlns:xs="http://www.w3.org/2001/XMLSchema"
                    xmlns:ev="http://www.w3.org/2001/xml-events"
                        xmlns:xxforms="http://orbeon.org/oxf/xml/xforms">
       
    <xhtml:head>
        <xhtml:title>Test</xhtml:title>
               
<xforms:model>

        <xforms:instance id="instance">
                <instance>
                        <test>xxx</test>
                        <action/>
                </instance>
        </xforms:instance>
       
</xforms:model>

        </xhtml:head>
    <xhtml:body>
                <xforms:group ref="/instance">
                        <table border="0" cellpadding="2" cellspacing="0">
                                <tr>
                                        <td align="right">Moving From:</td>
                                        <td>
                                                <xforms:input ref="test"/>
                                        </td>
                                </tr>
                                <tr>
                                        <td>
                                                <xforms:submit>
                                                        <xforms:label>Next</xforms:label>
                                                        <xforms:setvalue ref="/instance/action">next</xforms:setvalue>
                                                </xforms:submit>
                                        </td>
                                </tr>
                        </table>
                </xforms:group>
    </xhtml:body>
</xhtml:html>

and the page-flow:

<page path-info="/requests/test_request" view="test.xhtml">
   <action when="/instance/action = 'next'" action="details_posted.xpl">
      <result page="contact_request"/>
   </action>
</page>



--
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: XForms error: xforms:submit requires a submission attribute.

Hank Ratzesberger
Hi,

You need to declare a <submission> element and your
<submit> element needs an attribute, submission="mySubmissionIdRef"

http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-submission

Cheers,
Hank
Goleta, CA


----- Original Message -----
From: <[hidden email]>
To: <[hidden email]>
Sent: Friday, July 21, 2006 6:30 AM
Subject: [ops-users] XForms error: xforms:submit requires a submission attribute.


> Hi,
>
> I have a simple form that I wish to submit but I keep getting the above error when clicking on the submit button
>
> <xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
>            xmlns:xhtml="http://www.w3.org/1999/xhtml"
> xmlns:xi="http://www.w3.org/2001/XInclude"
>         xmlns:xs="http://www.w3.org/2001/XMLSchema"
>     xmlns:ev="http://www.w3.org/2001/xml-events"
> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms">
>
>    <xhtml:head>
>        <xhtml:title>Test</xhtml:title>
>
> <xforms:model>
>
> <xforms:instance id="instance">
> <instance>
> <test>xxx</test>
> <action/>
> </instance>
> </xforms:instance>
>
> </xforms:model>
>
> </xhtml:head>
>    <xhtml:body>
> <xforms:group ref="/instance">
> <table border="0" cellpadding="2" cellspacing="0">
> <tr>
> <td align="right">Moving From:</td>
> <td>
> <xforms:input ref="test"/>
> </td>
> </tr>
> <tr>
> <td>
> <xforms:submit>
> <xforms:label>Next</xforms:label>
> <xforms:setvalue ref="/instance/action">next</xforms:setvalue>
> </xforms:submit>
> </td>
> </tr>
> </table>
> </xforms:group>
>    </xhtml:body>
> </xhtml:html>
>
> and the page-flow:
>
> <page path-info="/requests/test_request" view="test.xhtml">
>   <action when="/instance/action = 'next'" action="details_posted.xpl">
>      <result page="contact_request"/>
>   </action>
> </page>
>
>

--------------------------------------------------------------------------------


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



--
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: Re: XForms error: xforms:submit requires a submission attribute.

assafn
Thanks Hank.

I still don't follow. I took my code from the tutorial where they clearly do not have any submission attributes. Is it because the docs are not up to date?

Thanks,

Assaf



--
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: XForms error: xforms:submit requires a submission attribute.

Hank Ratzesberger
In reply to this post by Hank Ratzesberger
Assaf,

I don't know about the tutorial.  The examples may
seem like a jump to light speed, but probably the
place to go for code snippets.

There is no <form> element, instead, you can have
more than one way to submit an XForms, but you
must declare them as <submission> elements, and
then your <submit> or <trigger> refers to them.

I hastily inserted a few lines below, which probably won't
do what just what you want, but they explain the
<submission> element.

Cheers,
Hank

>> <xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
>>            xmlns:xhtml="http://www.w3.org/1999/xhtml"
>> xmlns:xi="http://www.w3.org/2001/XInclude"
>>         xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>     xmlns:ev="http://www.w3.org/2001/xml-events"
>> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms">
>>
>>    <xhtml:head>
>>        <xhtml:title>Test</xhtml:title>
>>
>> <xforms:model>
>>
>> <xforms:instance id="instance">
>> <instance>
>> <test>xxx</test>
>> <action/>
>> </instance>
>> </xforms:instance>
<xforms:submission id="mySub"
  method="post"
  action="/requests/request_test" />

 

>> </xforms:model>
>>
>> </xhtml:head>
>>    <xhtml:body>
>> <xforms:group ref="/instance">
>> <table border="0" cellpadding="2" cellspacing="0">
>> <tr>
>> <td align="right">Moving From:</td>
>> <td>
>> <xforms:input ref="test"/>
>> </td>
>> </tr>
>> <tr>
>> <td>
<!-- here ... -->

>> <xforms:submit submission="mySub">
>> <xforms:label>Next</xforms:label>
>> <xforms:setvalue ref="/instance/action">next</xforms:setvalue>
>> </xforms:submit>
>> </td>
>> </tr>
>> </table>
>> </xforms:group>
>>    </xhtml:body>
>> </xhtml:html>
>>
>> and the page-flow:
>>
>> <page path-info="/requests/test_request" view="test.xhtml">
>>   <action when="/instance/action = 'next'" action="details_posted.xpl">
>>      <result page="contact_request"/>
>>   </action>
>> </page>
>>
>>
>



--
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: XForms error: xforms:submit requires a submission attribute.

Erik Bruchez
Administrator
In reply to this post by assafn
Assaf,

The tutorial is unfortunately totally out of date as of OPS 3.0
regarding the XForms functionality. It relates to the XForms Classic
engine, which you should no longer use.

While we work on an updated tutorial for the next stable release
(hopefully), examples such as XForms Controls, TODO Lists, and DMV Forms
are the ones to look at for inspiration.

-Erik

[hidden email] wrote:
> Thanks Hank.
>
> I still don't follow. I took my code from the tutorial where they clearly do not have any submission attributes. Is it because the docs are not up to date?
>
> Thanks,
>
> Assaf

--
Orbeon - XForms Everywhere:
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