You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2012/10/09 14:48:02 UTC

[jira] [Resolved] (WICKET-538) AjaxEventBehavior and associated components should feature Hot Key integration

     [ https://issues.apache.org/jira/browse/WICKET-538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-538.
------------------------------------

    Resolution: Later

No activity here since a long time. Closing the ticket.
                
> AjaxEventBehavior and associated components should feature Hot Key integration
> ------------------------------------------------------------------------------
>
>                 Key: WICKET-538
>                 URL: https://issues.apache.org/jira/browse/WICKET-538
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>         Environment: Java 2.6.20-15-generic, Java 6
>            Reporter: Julian Klappenbach
>            Priority: Minor
>
> The idea of hot keys was actually born of the desire to trap keyhits on a top level basis (body.onKeyDown) to ensure that focus issues would not interfere with appropriate default processing.  Basically, if one is working with a ModalWindow, both <CR> and <ESC> should invoke the behavior established by decades of UI history.  In order to achieve this, I've constructed a javascript map, which associates keycodes generated through keydown events with Ajax calls.  Initially, the focus was just for forms and ModalWindows.  But I soon discovered that the functionality could be extended to general hotkeys, where specific keys could be tied to ajax behaviors (swapping panels, invoking submit behavior, etc).  The benefit to the approach of having body.onKeyDown dispatch key events to a map is that there is a 1:n mapping of behaviors.  Also, it removes the necessity of having to assign handlers to each component within a form or page, which is a rather heavy handed exercise.  The complete solution would require modifications to AjaxEventBehavior, as well as some a few of the Ajax based components with the intent of establishing a corresponding keycode to trigger the event from the keyboard.  I realize that this is a rather special case, bu it is still one that both solves pressing issues with the current implementation, as well as providing hot keys, which should be of value to the greater user community.
> I have completed most of the changes and would be more than happy to offer my code up for review.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira