Ajax actions update the current page without navigating away. An AjaxAction is invoked by a client-side component, processes an AjaxContext on the server, and sends client actions back to the browser.
An AjaxAction does not return a Component. The browser receives PushActions such as UpdateElement or OpenModalDialog. This makes it suitable for live results, form feedback, and dialog interactions.
A button invokes the server, and the result is replaced in place. The surrounding documentation page stays loaded.
Open a dialog whose content is created by the Ajax action. This illustrates a second kind of PushAction rather than an element replacement.
Parameters supplied on an action are available on the request.
Choose AjaxAction when the user should remain on the current page. Keep request processing in the action and renderable UI in Components. Read incoming parameters through AjaxContext.
These examples introduce the most important behavior without attempting to document every method. For the complete reference, see https://doc.jdance.org.