Hi,
-- I stumbled on what seems like a bug today. If you have a form that uses an xf:dispatch that has an xf:property child element, the property can be retrieved with event('property-name'). However, if you also have the @delay attribute specified on the xf:dispatch, then the property is no longer passed and event('property-name') returns an empty string. Here is an example page: <?xml version="1.0" encoding="ISO-8859-1" ?> <xhtml:html xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xxf="http://orbeon.org/oxf/xml/xforms"> <xhtml:head> <xhtml:title>Delay with property</xhtml:title> <xf:model id="m-default"> <xf:instance id="i-default"> <default xmlns=""> <output>Default</output> </default> </xf:instance> <xf:action ev:event="e-message"> <xf:setvalue ref="instance('i-default')/output" value="event('message')" /> <xf:message level="xxf:log-warn">Message: <xf:output value="event('message')" /></xf:message> </xf:action> </xf:model> </xhtml:head> <xhtml:body> <xhtml:h3> <xf:output ref="instance('i-default')/output" /> </xhtml:h3> <xf:trigger> <xf:label value="'I will send a message'" /> <xf:dispatch ev:event="DOMActivate" target="m-default" name="e-message" delay="3000"> <xf:property name="message" value="'Test message'" /> </xf:dispatch> </xf:trigger> </xhtml:body> </xhtml:html>
Kind regards, Toon Andries You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Toon,
It does seem like a bug/limitation. If you check the code here: http://goo.gl/ljm1fK you'll see that the properties are completely ignored when there is a delay. They should be serialized. This could pose some issues as we encrypt and send such events to the browser, if the data is large. But we could possibly restrict what can be serialized (types and size). Do you have a workaround or are you looking for a fix? (We don't support the nested xf:delay element.) -Erik |
Free forum by Nabble | Edit this page |