I see that Orbeon supports a number of extension events, but what about standard UI Events like mousemove
and select
? How would I get an example like this XForms demo, which calls mousemove
directly from <xf:action ev:event="mousemove">
, to work in Orbeon?
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events">
<head>
<title>Mouse Events in XForms</title>
<model xmlns="http://www.w3.org/2002/xforms">
<instance id="style">
<data xmlns="">
<mouse>
<x>0</x>
<y>0</y>
<state>up</state>
</mouse>
</data>
</instance>
</model>
</head>
<body>
<group class="crop" xmlns="http://www.w3.org/2002/xforms">
<label>Move mouse here</label>
<action ev:event="mousemove">
<setvalue ref="mouse/x" value="event('clientX')"></setvalue>
<setvalue ref="mouse/y" value="event('clientY')"></setvalue>
</action>
<action ev:event="mousedown">
<setvalue ref="mouse/state">down</setvalue>
</action>
<action ev:event="mouseup">
<setvalue ref="mouse/state">up</setvalue>
</action> x: <output ref="mouse/x"></output> y: <output
ref="mouse/y"></output> state: <output ref="mouse/state"></output>
</group>
</body>
</html>
Orbeon Forms doesn't support mousemove
or select
. One reason is that the brains of Orbeon Forms currently reside on the server. Mouse events are expected to be very interactive and wouldn't work well with server roundtrips in the middle.
At some point in the future, this might change as more of the Orbeon Forms code is brought to the client. In the meanwhile, highly-interactive code must be written in JavaScript (or other client languages). Several of the XBL components included in Orbeon Forms use JavaScript for that purpose.