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

        Hide
        Martin Grigorov added a comment -

        No activity here since a long time. Closing the ticket.

        Show
        Martin Grigorov added a comment - No activity here since a long time. Closing the ticket.
        Hide
        Martin Grigorov added a comment -

        Hi Julian,

        Patches are always welcome.
        We currently work on improving Wicket Ajax code for Wicket.next. I'll be glad to see some code for this idea. Even just a prototype.

        Show
        Martin Grigorov added a comment - Hi Julian, Patches are always welcome. We currently work on improving Wicket Ajax code for Wicket.next. I'll be glad to see some code for this idea. Even just a prototype.
        Hide
        Julian Klappenbach added a comment -

        Timo, when I originally concieved of the enhancement, I was working on
        the 1.3 code base. Considerable changes have occurred in the
        interim. So, I would have to create an entirely new body of code to
        implement the change request. If this is truly desired, I would be
        happy provide the code, but it's going to take a bit before it's
        ready.

        Show
        Julian Klappenbach added a comment - Timo, when I originally concieved of the enhancement, I was working on the 1.3 code base. Considerable changes have occurred in the interim. So, I would have to create an entirely new body of code to implement the change request. If this is truly desired, I would be happy provide the code, but it's going to take a bit before it's ready.
        Hide
        Timo Rantalaiho added a comment -

        This is a new feature so belongs to 1.5, right?

        Julian, please attach your code as a patch! At least when trunk is 1.5 It seems very interesting.

        Show
        Timo Rantalaiho added a comment - This is a new feature so belongs to 1.5, right? Julian, please attach your code as a patch! At least when trunk is 1.5 It seems very interesting.
        Hide
        Martijn Dashorst added a comment -

        Moved to next milestone release.

        Show
        Martijn Dashorst added a comment - Moved to next milestone release.
        Hide
        Alastair Maw added a comment -

        This sounds very interesting, not least for solving multiply-mapped events, which are currently an issue. By all means attach a patch. We're not likely to look at this before 1.3.0 goes out, but we're certainly interested for 1.4.0. I'd recommend you kick off a discussion on the mailing list once 1.3.0 is out.

        Show
        Alastair Maw added a comment - This sounds very interesting, not least for solving multiply-mapped events, which are currently an issue. By all means attach a patch. We're not likely to look at this before 1.3.0 goes out, but we're certainly interested for 1.4.0. I'd recommend you kick off a discussion on the mailing list once 1.3.0 is out.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development