click event

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

click event

hcr
 
 
 Hello, shuold orbeon support click or dblclick? for example:
  <xforms:trigger>
      <xforms:label>click me</xforms:label>
      <xforms:action ev:event="click">
          <xxforms:script>alert('click event');</xxforms:script>
      </xforms:action>
      <xforms:action ev:event="dblclick">
          <xxforms:script>alert('dblclick event');</xxforms:script>
      </xforms:action>
  </xforms:trigger>  
 


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: click event

Erik Bruchez
Administrator
At the moment we only support DOMActivate. There is no support for  
detecting double-clicks with DOMActivate. So I guess yes, if we wanted  
double-click support, we would need to add that, but it is not  
implemented yet. I am not sure how often web apps use double-clicks  
specifically though.

-Erik

On Sep 27, 2008, at 11:47 PM, hechengrong wrote:

>
>
>  Hello, shuold orbeon support click or dblclick? for example:
>   <xforms:trigger>
>       <xforms:label>click me</xforms:label>
>       <xforms:action ev:event="click">
>           <xxforms:script>alert('click event');</xxforms:script>
>       </xforms:action>
>       <xforms:action ev:event="dblclick">
>           <xxforms:script>alert('dblclick event');</xxforms:script>
>       </xforms:action>
>   </xforms:trigger>
>
>
> --
> 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
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: click event

richhl
In reply to this post by hcr
If you want to react to events not defined in xforms event model (like click), you have to catch them from javascript and dispatch to an event handler defined at the model (http://www.orbeon.com/ops/doc/reference-xforms-2#xforms-javascript-events).

<ol onclick="js_dosomething();">
....
</ol>

function js_dosomething() {
        ORBEON.xforms.Document.dispatchEvent("main-model", "xforms_dosomething_event");
}

<xforms:model id="main-model" xxforms:external-events="xforms_dosomething_event">
        <xforms:action ev:event="xforms_dosomething_event">
                <xforms:setvalue ref="first-name" value="instance('default-values')/first-name"/>
                <xforms:toggle case="first-name-case"/>
        </xforms:action>
</xforms:model>

greetings

rich


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
hcr
Reply | Threaded
Open this post in threaded view
|

Re: Re: click event

hcr
 Thank you for help, I will try it.
 
 
 

在2008-10-02,"Richard C. Hidalgo Lorite" <[hidden email]> 写道:
>If you want to react to events not defined in xforms event model (like click), you have to catch them from javascript and dispatch to an event handler defined at the model (http://www.orbeon.com/ops/doc/reference-xforms-2#xforms-javascript-events).
>
><OL onclick="js_dosomething();">
>....
>
>
>function js_dosomething() {
>	ORBEON.xforms.Document.dispatchEvent("main-model", "xforms_dosomething_event");
>}
>
>
>	
>		
>		
>	
>
>
>greetings
>
>rich



[广告] 特惠尝必胜客26道新品

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