This is probably a question for the user group, but I thought I might post it here first. In putting together an application based on Wicket I've noticed the following:
1. Load a form full of Ajax links and features, and even an AjaxSubmitButton / Link. But it's not easy to have the AjaxFormSubmit behavior invoked by <CR>. In many cases, the traditional, non-ajax submit behavior is triggered. What is needed appears to be something at the body level to handle keydown events. One can do this in a variety of ways, but I can't help but think that something more user-friendly, such as [class AjaxForm extends Form] would be helpful to the user community at large. 2. While we're at it, if we're trapping events at a high level like <body>, why not put together a javascript framework, in the form of a map, where keyCodes from keydown events are mapped to AjaxEventBehavior fn's, and the functions executed. This would enable ajax based HOT KEYS for an application. Trapping events at <body> would also ensure that <ESC> triggered the ModalWindow's cancel behavior. This would mean a small change in the IBehavior API, or perhaps higher up, since only Ajax*Behaviors appear to make contributions to the DOM. Most other behaviors exist to customize tag attributes, and wouldn't participate in such a scheme. 3. In order to do such trickery, I've noticed that what's rendered up by AjaxEventBehavior.getEventHandler() isn't working when offered to javascript's eval. There's additional decoration that might be getting in the way (I'm testing this now), or perhaps eval isn't compatible with the framework provided by wicket-ajax.js. Either way, what is really needed is an API that offers up javascript and not strings from Behaviors. Vaynberg said that this is on the way. How soon, and who would be doing the work? If possible, this is something in which I'd like to participate, the sooner the better. I know that these items of functionality may not be the priority to the larger Wicket developer community than they are to me, but to move forward with Wicket as our preferred presentation framework, these items (especially trapping <CR> on forms and executing the default button's ajax form submit behavior fn) have to be in place. Since there are many ways to do these things, I'm interested in hearing the solutions of others, or if I can be some assistance in this matter. -jjk
