AjaxCallback.javaAjaxCallback must provide a callback(AjaxRequestTarget) method that receives Wicket's AjaxRequestTarget — the standard Wicket object for composing Ajax responses (appending JavaScript, adding components for re-render, etc.). The interface extends Serializable, which is required because Wicket may serialize callback instances as part of page state in its session or disk-based page store.Wicket provides its own callback mechanisms (AbstractDefaultAjaxBehavior, AjaxEventBehavior, etc.), but they are tied to specific component lifecycle hooks. The Micromata team created a simpler, detached callback abstraction that can be passed around independently of Wicket components. This interface is consumed by classes like MDefaultAjaxBehavior that bridge between the lightweight callback contract and Wicket's behavior/lifecycle system.
The companion interface AjaxFormSubmitCallback (file #2773) extends this interface, adding an onError method for form submission error handling. This follows the Command pattern: the basic callback is the command interface, and the form variant adds error handling as a specialization.
| Commit | What changed |
|---|---|
868d6abb7 through ceb63e8a1 | Six annual copyright header updates (2001-2021 → 2001-2026). The interface contract has not changed — only the copyright year range in the file header has been incremented annually. This is one of the most stable files in the wicket module. |