xxforms:link trigger

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

xxforms:link trigger

Boon Low
Hi,

I would like to render the following XML submission output:

<results>
     <data>
         <url></url>
         <title></title>
     </data>
     <data>
         <url></url>
         <title></title>
     </data>
     <data>
         <url></url>
         <title></title>
     </data>
</results>

as a series of triggers as links via the xforms:repeat element. I  
have tried and found that it possible to use:

<xforms:trigger appearance="xxforms:link">
     <xforms:output ref="instance('etc..')/title"/>
</xforms:trigger>

But how do you specify the "href" element of the link of the trigger  
(using the 'url' element of the XML submission).

Regards,

Boon




-----
Boon Low
System Development Officer,
EGEE Training and Induction
UK National e-Science Centre
http://homepages.ed.ac.uk/boon





--
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: xxforms:link trigger

Erik Bruchez
Administrator
Boon,

A trigger can have a label, but then there is no "href" attribute you
can specify. The way a trigger works is that it will send a
DOMActivate XForms event when activated, and you can then use an event
handler to catch that.

If you expect that a click on the trigger will follow a link, then you
should use the xforms:load action. However, this is not yet
implemented:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=303776&group_id=168&atid=350207

How I expect this to work when implemented is:

<xforms:repeat nodeset="instance('my-instance')/data">
   <xforms:trigger appearance="xxforms:link">
     <xforms:label ref="title"/>
     <xforms:load ev:event="DOMActivate" ref="url" show="replace"/>
   </xforms:trigger>
</xforms:repeat>

-Erik

Boon Low wrote:
 > Hi,
 >
 > I would like to render the following XML submission output:
 >
 > <results>
 >     <data>
 >         <url></url>
 >         <title></title>
 >     </data>
 >     <data>
 >         <url></url>
 >         <title></title>
 >     </data>
 >     <data>
 >         <url></url>
 >         <title></title>
 >     </data>
 > </results>
 >
 > as a series of triggers as links via the xforms:repeat element. I  have
 > tried and found that it possible to use:
 >
 > <xforms:trigger appearance="xxforms:link">
 >     <xforms:output ref="instance('etc..')/title"/>
 > </xforms:trigger>
 >
 > But how do you specify the "href" element of the link of the trigger
 > (using the 'url' element of the XML submission).
 >
 > Regards,
 >
 > Boon




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