Is it possible to know whether the CTRL key was pressed to trigger the click event?

23 views
Skip to first unread message

Andres Navidad

unread,
Jan 9, 2012, 12:06:14 PM1/9/12
to jaxcen...@googlegroups.com
Hi! 

I have the next override the click event :

HtmlImage limpiar = new HtmlImage(this, "limpiar"){
@Override
protected void onClick(){
try{
tipo.setSelectedIndex(0);
servicioActividad.setSelectedIndex(0);
}catch(Exception e){
e.printStackTrace();
}
}
};

Thanks!!!!


Mukesh Prasad

unread,
Jan 9, 2012, 7:57:29 PM1/9/12
to jaxcen...@googlegroups.com
This is not available right now in Jaxcent.  It involves properties of the "event" object (discarding backwards compatibility with very old browsers.)
 
A solution for this would be to save all the properties of the event object, which can then be queried from the Java side.
 
I could add this in the next release.  If anybody in the Jaxcent community has JavaScript experience and a general understanding of the Jaxcent code, they are welcome to give it a try.
 
 / Mukesh
--
You received this message because you are subscribed to the Google Groups "Jaxcent" group.
To view this discussion on the web visit https://groups.google.com/d/msg/jaxcentgroup/-/A6_b8cZrNYEJ.
To post to this group, send email to jaxcen...@googlegroups.com.
To unsubscribe from this group, send email to jaxcentgroup...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jaxcentgroup?hl=en.

Andres Navidad

unread,
Jan 10, 2012, 3:58:22 AM1/10/12
to jaxcen...@googlegroups.com
Thank you very much!!!

I don't know exactly what you mean when you say.. "A solution for this would be to save all the properties of the event object, which can then be queried from the Java side."

¿Are jaxcent page for the new changes that you plan in the next release?

Thanks again !

pD: Excuse me my english! :)



Piero Steffano Del Aguila Macher

unread,
Jan 10, 2012, 8:45:46 AM1/10/12
to jaxcen...@googlegroups.com
You could use something like that:

Java side:
execJavaScriptCode("addKeyBehaviour", false,
new Object[] { txtName,"function(event){alert('add behaviour to handle CTRL'+event.keycode);}" });

Html side:

function addKeyBehaviour(field,functionCode){
field.onKeyDown=eval(functionCode);
}


2012/1/10 Andres Navidad <andresna...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Jaxcent" group.
To view this discussion on the web visit https://groups.google.com/d/msg/jaxcentgroup/-/xPV1Zv91jTIJ.

To post to this group, send email to jaxcen...@googlegroups.com.
To unsubscribe from this group, send email to jaxcentgroup...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jaxcentgroup?hl=en.



--
Piero Steffano Del Aguila Macher
          J2EE Specialist
Reply all
Reply to author
Forward
0 new messages