You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Boris Brinza <bo...@htsolution.sk> on 2013/06/08 22:31:14 UTC
AjaxEventBehavior("onclick")
Hello
how to get status of keyboard in onclick handler, i mean status of ctrl
or alt keys?
i want to select multiple lines in my table using ctrl-click on lines.
i.ve found some solutions using overriden getCallbackScript, but it
seems it;'s working only in older wicket versions, after several hours
i've not found any working solution for wicket 6.
Thanks for any advice
boris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: AjaxEventBehavior("onclick")
Posted by Boris Brinza <bo...@htsolution.sk>.
thanks very much, sven
works exactly as i want!
have a nice evening
boris
On 06/08/2013 10:58 PM, Sven Meier wrote:
> attributes.getDynamicExtraParameters().add(
> "return {'ctrl' : attrs.event.ctrlKey, 'shift' : attrs.event.shiftKey}"
> );
> }
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: AjaxEventBehavior("onclick")
Posted by Sven Meier <sv...@meiers.net>.
Override the following in your event behavior:
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
super.updateAjaxAttributes(attributes);
attributes.getDynamicExtraParameters().add(
"return {'ctrl' : attrs.event.ctrlKey, 'shift' : attrs.event.shiftKey}"
);
}
You can then analyse the parameters 'ctrl' and 'shift' in your
#onEvent() hook.
Hope this helps
Sven
On 06/08/2013 10:31 PM, Boris Brinza wrote:
> Hello
> how to get status of keyboard in onclick handler, i mean status of
> ctrl or alt keys?
> i want to select multiple lines in my table using ctrl-click on lines.
> i.ve found some solutions using overriden getCallbackScript, but it
> seems it;'s working only in older wicket versions, after several hours
> i've not found any working solution for wicket 6.
> Thanks for any advice
>
> boris
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org