You can use the callbackdecorator to add the _javascript_ which you need. Something like this perhaps:
component.add(new AjaxEventBehavior("onclick") {
private static final long serialVersionUID = 1L;
protected void onEvent(AjaxRequestTarget target) {
target.appendJavascript("alert('hey');");
}
protected CharSequence getCallbackScript(CharSequence partialCall, CharSequence onSuccessScript, CharSequence onFailureScript) {
String callbackScript = super.getCallbackScript(partialCall, onSuccessScript, onFailureScript).toString();
callbackScript = "if(event.ctrlKey == false) return false;"+callbackScript;
return callbackScript;
}
});
Frank
On 8/3/06, p.jasson <
[EMAIL PROTECTED]> wrote:
I have a markup container with AjaxEvenBehavior for 'onclick'.
In the onEvent method i need to know whether CTRL was pressed during the
click or no.
How can it be done?
Thanks.
--
View this message in context: http://www.nabble.com/CTRL%2Bclick-tf2047972.html#a5640400
Sent from the Wicket - User forum at Nabble.com.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user