You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Antoine van Wel <an...@gmail.com> on 2011/03/08 11:59:29 UTC

shift / ctrl / alt keys + ajax

Hi,

when clicking an (ajax)link, or a checkbox, etc, on the server side
I'd like to know whether the shift, ctrl or alt keys are pressed at
the same time.

So I figure I need to fetch via JavaScript and adapt the ajax call
with some extra parameters.
Any thoughts how to do that in a nice & clean way in 1.5 without too
much hacking involved?


regards,
Antoine

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: shift / ctrl / alt keys + ajax

Posted by Antoine van Wel <an...@gmail.com>.
Thanks! I'll look into it this weekend and get back here. Preferably
I'd like a solution without forms, but this approach is certainly
better than hacking into the wicket-ajax call.


Antoine


On Wed, Mar 9, 2011 at 6:07 AM, Richard Nichols <rn...@visural.com> wrote:
> You can do this on the client side relatively easily.
>
> Just bind a javascript event handler to the onkeydown event in the browser.
>
> When these key(s) are depressed change a form input to indicate which keys
> are pressed.
>
> When your Ajax event submits, you can check the model of the component the
> input is bound to to determine if the key(s) were pressed.
>
> cheers,
> Richard.
>
> On Tue, Mar 8, 2011 at 9:59 PM, Antoine van Wel
> <an...@gmail.com>wrote:
>
>> Hi,
>>
>> when clicking an (ajax)link, or a checkbox, etc, on the server side
>> I'd like to know whether the shift, ctrl or alt keys are pressed at
>> the same time.
>>
>> So I figure I need to fetch via JavaScript and adapt the ajax call
>> with some extra parameters.
>> Any thoughts how to do that in a nice & clean way in 1.5 without too
>> much hacking involved?
>>
>>
>> regards,
>> Antoine
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
> --
> Richard Nichols
> http://www.richardnichols.net/ :: http://onmydoorstep.com.au/
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: shift / ctrl / alt keys + ajax

Posted by Richard Nichols <rn...@visural.com>.
You can do this on the client side relatively easily.

Just bind a javascript event handler to the onkeydown event in the browser.

When these key(s) are depressed change a form input to indicate which keys
are pressed.

When your Ajax event submits, you can check the model of the component the
input is bound to to determine if the key(s) were pressed.

cheers,
Richard.

On Tue, Mar 8, 2011 at 9:59 PM, Antoine van Wel
<an...@gmail.com>wrote:

> Hi,
>
> when clicking an (ajax)link, or a checkbox, etc, on the server side
> I'd like to know whether the shift, ctrl or alt keys are pressed at
> the same time.
>
> So I figure I need to fetch via JavaScript and adapt the ajax call
> with some extra parameters.
> Any thoughts how to do that in a nice & clean way in 1.5 without too
> much hacking involved?
>
>
> regards,
> Antoine
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Richard Nichols
http://www.richardnichols.net/ :: http://onmydoorstep.com.au/