xf:ouput problem with multiple xml instances

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

xf:ouput problem with multiple xml instances

Edgard Pineda-2
Hi everyone,

I'm trying to use a xf:select1 control to set and show a value of an
element from a second instance. Test the following example on XForms
Sandbox: ( I use OPS 3.5 M1):

<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
      xmlns:ev="http://www.w3.org/2001/xml-events"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:my="http://www.example.com/my">
 <head>
  <xf:model>
   <xf:instance id="first">
        <my:root><my:data>testing</my:data></my:root>
   </xf:instance>
   <xf:instance id="second">
    <my:root2><my:value>A</my:value></my:root2>
   </xf:instance>
   <xf:submission id="submit"
action="http://xformstest.org/cgi-bin/echo.sh" method="post"/>
  </xf:model>
 </head>
 <body>
Form:
  <xf:group ref="instance('first')">
    <p>root/data="<xf:output value="my:data"/>"</p>
    <xf:select1 id="sel1" appearance="full"
                ref="instance('second')/my:value">
     <xf:label>test</xf:label>
     <xf:item>
      <xf:label>A</xf:label>
      <xf:value>A</xf:value>
     </xf:item>
     <xf:item>
      <xf:label>B</xf:label>
      <xf:value>B</xf:value>
     </xf:item>
     <xf:item>
      <xf:label>C</xf:label>
      <xf:value>C</xf:value>
     </xf:item>
     <xf:action ev:event="xforms-value-changed">
      <xf:message level="modal">xforms-value-changed: (<xf:output
value="."/>)</xf:message>
     </xf:action>
    </xf:select1>
  </xf:group>
 </body>
</html>

For example, when you click over the B radio-button we should get the
following message: "xforms-value-changed: (B)", but instead I got
"xforms-value-changed: (         )".

There is a bug in xf:output or I'm doing something wrong?

Thank you in advance,
Edgard.



--
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: xf:ouput problem with multiple xml instances

Erik Bruchez
Administrator
Edgard,

 > I'm trying to use a xf:select1 control to set and show a value of an
 > element from a second instance. Test the following example on XForms
 > Sandbox: ( I use OPS 3.5 M1):

[...]

 > For example, when you click over the B radio-button we should get the
 > following message: "xforms-value-changed: (B)", but instead I got
 > "xforms-value-changed: (         )".
 >
 > There is a bug in xf:output or I'm doing something wrong?

Neither: there was a bug in xforms:message, which did not correctly
evaluate its child xforms:output elements. I committed a fix for
this. It will make it to the next nightly build:

   http://forge.objectweb.org/nightlybuilds/ops/ops/

-Erik

--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws