A simple XForms example ("Hello World XForms"): what is wrong?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

A simple XForms example ("Hello World XForms"): what is wrong?

Florent Georges
  Hi

  I'm using ops-3.0.1.200602032326.  I'm trying to implement
a simple XForms example.  I use the "Hello World XForms"
<http://localhost:8080/ops/goto-example/tutorial-hello3>
example from my install.  Here is what I have now:

    /ops/drkm/hello-xf> ls
    page-flow.xml
    page-flow.xpl
    view.xhtml

    /ops/drkm/hello-xf> cat page-flow.xml
    <config xmlns="http://www.orbeon.com/oxf/controller">
      <page path-info="/drkm/hello-xf" view="view.xhtml"/>
      <epilogue url="/config/epilogue.xpl"/>
    </config>

    /ops/drkm/hello-xf> cat page-flow.xpl
    <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
              xmlns:oxf="http://www.orbeon.com/oxf/processors">
      <p:processor name="oxf:page-flow">
        <p:input name="controller" href="page-flow.xml"/>
      </p:processor>
    </p:config>

    /ops/drkm/hello-xf> cat view.xhtml
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:xf="http://www.w3.org/2002/xforms">
      <head>
        <title>Hello!</title>
        <xf:model>
          <xf:instance>
            <first-name xmlns=""/>
          </xf:instance>
        </xf:model>
      </head>
      <body>
        <p>Please enter your first name:
          <xf:input ref="/first-name" incremental="true"/></p>
        <p><xf:output value="
            if ( normalize-space(/first-name) eq '' ) then
              ''
            else
              concat('Hello, ', /first-name, '!')"/></p>
      </body>
    </html>

  But when I access http://localhost:8080/ops/drkm/hello-xf,
I see the string "Please enter your first name:" but no
input field.  More precisely, I can see it while a fraction
of a second, but it disapear very quickly.

  By inspecting the generated HTML for both the example from
OPS and my example, I saw a difference (first OPS, then
mine):

    <span id="xforms-element-3" [...]>
      [...]
      <input name="$portlet$p1.xforms-element-3" [...]>

    <span id="xforms-element-3" [...]>
      [...]
      <input name="xforms-element-3" [...]>

  I can't figure out what the problem is.  Do you have an
idea?

  Thanks in advance.

  Regards,

--drkm






















       

       
               
___________________________________________________________________________
Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet !
Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences.
http://fr.answers.yahoo.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