Problem showing xforms-data

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

Problem showing xforms-data

ct-2
Hi everybody,

i'm absolutely new to OPS and i'm stuck with what seems to be a trivial problem: i can't get the example from tutorial-3 to work as expected.

this ist my view.xsl, which is - apart from the german names and the encoding - pretty much the same as in the tutorial.

<?xml version="1.0" encoding="iso-8859-1" ?>
<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:xforms="http://www.w3.org/2002/xforms"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xsl:version="2.0">
 
  <head>
    <title>Hello World</title>
  </head>
  <body>
    <xforms:group ref="/myform">
      <p>
        Bitte Vornamen eingeben:
        <xforms:input ref="vorname" />
        <xforms:submit>
          <xforms:label>Greet Me!</xforms:label>
        </xforms:submit>
      </p>
      This works: <xforms:output value="concat ('Vorname: ', /myform/vorname)" />
      This doesn't: <xsl:value-of select="/myform/vorname" />!
    </xforms:group>
  </body>
</html>

what happens when i press the submit-button is, that the input-field itself "remembers" the input value. Also the line <xforms:output value="concat ('Vorname: ', /myform/vorname)" /> outputs the input value to the page.

The line <xsl:value-of select="/myform/vorname" /> does not output anything, whereas the tutorial says it would do so. How can i access xforms-data apart from the <xforms:output>-directive? How can i store xforms-data in an <xsl:variable>?

Thank you for any hint
Christian



--
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: Problem showing xforms-data

Ryan Puddephatt
Christian,
        You store XForms data in the instance. Which should be in and
Xforms:model or a separate file depending on if your using NG or Classic
engine. The xsl:value-of will only run once on the page at runtime, the
xforms output is dynamic and will update when the value changes. Also the
submit button won't do anything, because you don't have a submission in your
model!

Ryan Puddephatt
Software Engineer
TFX Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotand
EH54 7DP
 
* [hidden email]
( 01506 407 110
7  01506 407 108
 

>-----Original Message-----
>From: [hidden email] [mailto:[hidden email]]
>Sent: 15 February 2006 10:44
>To: [hidden email]
>Subject: [ops-users] Problem showing xforms-data
>
>Hi everybody,
>
>i'm absolutely new to OPS and i'm stuck with what seems to be a trivial
>problem: i can't get the example from tutorial-3 to work as expected.
>
>this ist my view.xsl, which is - apart from the german names and the
>encoding - pretty much the same as in the tutorial.
>
><?xml version="1.0" encoding="iso-8859-1" ?>
><html xmlns="http://www.w3.org/1999/xhtml"
>  xmlns:xforms="http://www.w3.org/2002/xforms"
>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>  xsl:version="2.0">
>
>  <head>
>    <title>Hello World</title>
>  </head>
>  <body>
>    <xforms:group ref="/myform">
>      <p>
>        Bitte Vornamen eingeben:
>        <xforms:input ref="vorname" />
>        <xforms:submit>
>          <xforms:label>Greet Me!</xforms:label>
>        </xforms:submit>
>      </p>
>      This works: <xforms:output value="concat ('Vorname: ',
>/myform/vorname)" />
>      This doesn't: <xsl:value-of select="/myform/vorname" />!
>    </xforms:group>
>  </body>
></html>
>
>what happens when i press the submit-button is, that the input-field itself
>"remembers" the input value. Also the line <xforms:output value="concat
>('Vorname: ', /myform/vorname)" /> outputs the input value to the page.
>
>The line <xsl:value-of select="/myform/vorname" /> does not output
>anything, whereas the tutorial says it would do so. How can i access
>xforms-data apart from the <xforms:output>-directive? How can i store
>xforms-data in an <xsl:variable>?
>
>Thank you for any hint
>Christian




--
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: Problem showing xforms-data

ct-2
Hello Ryan,

in fact i have the xforms:model in an external file, which looks like this:

<xforms:model xmlns:xforms="http://www.w3.org/2002/xforms">
        <xforms:instance>
                <myform>
                        <vorname/>
                </myform>
        </xforms:instance>
</xforms:model>

the according entry in page-flow is this:
<page path-info="/tutorial-hello3" xforms="xforms-model.xml" view="view.xsl"/>

by the way: what's the difference between "classic" in "NG"-mode?

Christian



--
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: Problem showing xforms-data

Ryan Puddephatt
If your learning XForms I would suggest NG as it's the newer engine within
orbeon, meaning that its more efficient and there is a lot more use of AJAX!

I believe there is a Hello World example on the website for the NG, your
using classic, because of the xforms attribute in your page flow!

Ryan Puddephatt
Software Engineer
TFX Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotand
EH54 7DP
 
* [hidden email]
( 01506 407 110
7  01506 407 108
 

>-----Original Message-----
>From: [hidden email] [mailto:[hidden email]]
>Sent: 15 February 2006 11:07
>To: [hidden email]
>Subject: Re: RE: [ops-users] Problem showing xforms-data
>
>Hello Ryan,
>
>in fact i have the xforms:model in an external file, which looks like this:
>
><xforms:model xmlns:xforms="http://www.w3.org/2002/xforms">
> <xforms:instance>
> <myform>
> <vorname/>
> </myform>
> </xforms:instance>
></xforms:model>
>
>the according entry in page-flow is this:
><page path-info="/tutorial-hello3" xforms="xforms-model.xml"
>view="view.xsl"/>
>
>by the way: what's the difference between "classic" in "NG"-mode?
>
>Christian




--
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: Problem showing xforms-data

Erik Bruchez
Administrator
In reply to this post by ct-2
[hidden email] wrote:

> by the way: what's the difference between "classic" in "NG"-mode?

http://www.orbeon.com/ops/doc/home-faq#xforms-classic-ng

-Erik




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