Xforms Submission problem

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

Xforms Submission problem

Frank Feng
Hi all,

I'm new to xforms, just tried a simple xform and want to submit the data to
a jsp file. But when I click "Save" button, nothing happened. Can you help?
Thanks in advance. The xform is shown as follows:

----------------------------------------------------------------------------
-----
<?xml version="1.0"?>
<html xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
          xmlns:xs="http://www.w3.org/2001/XMLSchema"
          xmlns:xhtml="http://www.w3.org/1999/xhtml"
          xmlns:ev="http://www.w3.org/2001/xml-events"
          xmlns:xf="http://www.w3.org/2002/xforms"
          xmlns:widget="http://orbeon.org/oxf/xml/widget"
          xmlns="http://www.w3.org/1999/xhtml">

        <head>
                <title>XForms inputs with labels</title>
                <xf:model>
                        <xf:instance xmlns="" id="test-instance">
                                <data>
                                        <PersonGivenName/>
                                        <PersonSurName/>
                                </data>
                        </xf:instance>
               
                        <xf:submission method="post" id="save-submission"
                                ref="instance('test-instance')"
                                action="writexml2.jsp"
                                replace="instance">
                        </xf:submission>
                </xf:model>
        </head>
        <body>
                <p>Enter your first name, and last name.</p>
                <xf:input ref="PersonGivenName" incremental="true">
                        <xf:label>Input First name:</xf:label>
                        <xf:hint>Also known as given name.</xf:hint>
                </xf:input>
                <br/>
                <xf:input ref="PersonSurName" incremental="true">
                        <xf:label>Input Last Name:</xf:label>
                        <xf:hint>Also known as sur name or family
name.</xf:hint>
                </xf:input>
                <br/>
                <br/> Output First Name: <b>
                        <xf:output ref="PersonGivenName"/>
                </b>
                <br/> Output Sur Name: <b>
                        <xf:output ref="PersonSurName"/>
                </b>
                <xf:submit submission="save-submission">
                        <xf:label>Save</xf:label>
                </xf:submit>
        </body>
</html>
----------------------------------------------------------------------------
-----

Regards,

Frank



--
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: Xforms Submission problem

Hank Ratzesberger

Hi Frank,

What instance do you want to replace?  You should specify that as a
submission attribute, instance="my-instance" (even if it is the same
as the ref="" instance)

--Hank

On Sep 22, 2008, at 3:21 AM, yf508 wrote:

> Hi all,
>
> I'm new to xforms, just tried a simple xform and want to submit the  
> data to
> a jsp file. But when I click "Save" button, nothing happened. Can  
> you help?
> Thanks in advance. The xform is shown as follows:
>
> ----------------------------------------------------------------------
> ------
> -----
> <?xml version="1.0"?>
> <html xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>  xmlns:xs="http://www.w3.org/2001/XMLSchema"
>  xmlns:xhtml="http://www.w3.org/1999/xhtml"
>  xmlns:ev="http://www.w3.org/2001/xml-events"
>  xmlns:xf="http://www.w3.org/2002/xforms"
>  xmlns:widget="http://orbeon.org/oxf/xml/widget"
>  xmlns="http://www.w3.org/1999/xhtml">
>
> <head>
> <title>XForms inputs with labels</title>
> <xf:model>
> <xf:instance xmlns="" id="test-instance">
> <data>
> <PersonGivenName/>
> <PersonSurName/>
> </data>
> </xf:instance>
>
> <xf:submission method="post" id="save-submission"
> ref="instance('test-instance')"
> action="writexml2.jsp"
> replace="instance">
> </xf:submission>
> </xf:model>
> </head>
> <body>
> <p>Enter your first name, and last name.</p>
> <xf:input ref="PersonGivenName" incremental="true">
> <xf:label>Input First name:</xf:label>
> <xf:hint>Also known as given name.</xf:hint>
> </xf:input>
> <br/>
> <xf:input ref="PersonSurName" incremental="true">
> <xf:label>Input Last Name:</xf:label>
> <xf:hint>Also known as sur name or family
> name.</xf:hint>
> </xf:input>
> <br/>
> <br/> Output First Name: <b>
> <xf:output ref="PersonGivenName"/>
> </b>
> <br/> Output Sur Name: <b>
> <xf:output ref="PersonSurName"/>
> </b>
> <xf:submit submission="save-submission">
> <xf:label>Save</xf:label>
> </xf:submit>
> </body>
> </html>
> ----------------------------------------------------------------------
> ------
> -----
>
> Regards,
>
> Frank
>
>
> --
> 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
Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042







--
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: Xforms Submission problem

Erik Bruchez
Administrator
In reply to this post by Frank Feng
When nothing happens, be sure to enable XForms logging so you can have  
an idea of what went wrong:

   http://www.orbeon.com/ops/doc/reference-xforms-2#xforms-logging

-Erik

On Sep 22, 2008, at 3:21 AM, yf508 wrote:

> Hi all,
>
> I'm new to xforms, just tried a simple xform and want to submit the  
> data to
> a jsp file. But when I click "Save" button, nothing happened. Can  
> you help?
> Thanks in advance. The xform is shown as follows:
>
> ----------------------------------------------------------------------------
> -----
> <?xml version="1.0"?>
> <html xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>  xmlns:xs="http://www.w3.org/2001/XMLSchema"
>  xmlns:xhtml="http://www.w3.org/1999/xhtml"
>  xmlns:ev="http://www.w3.org/2001/xml-events"
>  xmlns:xf="http://www.w3.org/2002/xforms"
>  xmlns:widget="http://orbeon.org/oxf/xml/widget"
>  xmlns="http://www.w3.org/1999/xhtml">
>
> <head>
> <title>XForms inputs with labels</title>
> <xf:model>
> <xf:instance xmlns="" id="test-instance">
> <data>
> <PersonGivenName/>
> <PersonSurName/>
> </data>
> </xf:instance>
>
> <xf:submission method="post" id="save-submission"
> ref="instance('test-instance')"
> action="writexml2.jsp"
> replace="instance">
> </xf:submission>
> </xf:model>
> </head>
> <body>
> <p>Enter your first name, and last name.</p>
> <xf:input ref="PersonGivenName" incremental="true">
> <xf:label>Input First name:</xf:label>
> <xf:hint>Also known as given name.</xf:hint>
> </xf:input>
> <br/>
> <xf:input ref="PersonSurName" incremental="true">
> <xf:label>Input Last Name:</xf:label>
> <xf:hint>Also known as sur name or family
> name.</xf:hint>
> </xf:input>
> <br/>
> <br/> Output First Name: <b>
> <xf:output ref="PersonGivenName"/>
> </b>
> <br/> Output Sur Name: <b>
> <xf:output ref="PersonSurName"/>
> </b>
> <xf:submit submission="save-submission">
> <xf:label>Save</xf:label>
> </xf:submit>
> </body>
> </html>
> ----------------------------------------------------------------------------
> -----
>
> Regards,
>
> Frank
>
>
> --
> 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
--
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
OW2 mailing lists service home page: http://www.ow2.org/wws