Wicket
  1. Wicket
  2. WICKET-538

AjaxEventBehavior and associated components should feature Hot Key integration

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Later
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: wicket
    • Labels:
      None
    • Environment:
      Java 2.6.20-15-generic, Java 6

      Description

      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.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Julian Klappenbach
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development