UI Orbeon 形式的事件
UI Events in Orbeon Forms
我看到 Orbeon 支持一些 extension events, but what about standard UI Events like mousemove
and select
? How would I get an example like this XForms demo,直接从 <xf:action ev:event="mousemove">
调用 mousemove
,以便在 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 表单不支持 mousemove
或 select
。原因之一是 Orbeon Forms 的大脑目前驻留在服务器上。鼠标事件应该是非常互动的,并且不能很好地处理中间的服务器往返。
在未来的某个时候,随着更多 Orbeon Forms 代码被提供给客户端,这可能会发生变化。同时,高度交互的代码必须用JavaScript(或其他客户端语言)编写。 Orbeon Forms 中包含的一些 XBL 组件为此目的使用 JavaScript。
我看到 Orbeon 支持一些 extension events, but what about standard UI Events like mousemove
and select
? How would I get an example like this XForms demo,直接从 <xf:action ev:event="mousemove">
调用 mousemove
,以便在 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 表单不支持 mousemove
或 select
。原因之一是 Orbeon Forms 的大脑目前驻留在服务器上。鼠标事件应该是非常互动的,并且不能很好地处理中间的服务器往返。
在未来的某个时候,随着更多 Orbeon Forms 代码被提供给客户端,这可能会发生变化。同时,高度交互的代码必须用JavaScript(或其他客户端语言)编写。 Orbeon Forms 中包含的一些 XBL 组件为此目的使用 JavaScript。