|
When a user clicks a button in a browser or resizes the window, AjaxSwing emulates the user action for the
GUI application. After the window and its components have been updated with the data from the page, the action
emulation takes place. Not every submitted page would cause action emulation. For instance, a page can be
submitted by a dynamic event triggered by a selection or content change in a component that has a listener.
AjaxSwing supports the following standard actions:
- Button click
- Menu item selection
- Closing of a window or internal frame
- Resizing of JSplitPane
- Changing tab selection in JTabbedPane
- Clicking on a column label in JTable
- Double clicking in a window (currently only processed for JFileChooser)
Action emulation can be overridden by implementing ActionEmulator interface and registering the implementation
with AjaxSwing. ActionEmulator interface, defined in com.creamtec.ajaxswing.gui package,
has only one method emulateAction. This method is called before the standard emulation takes place and
if it returned true, the emulation of action is considered to be complete. Action emulators can be registered
for a particular window or for all windows. See the documentation on
application configuration file
for information on how to register a custom action emulator.
AjaxSwing documentation includes CustomControlProcessor class, which demonstrates the implementation of
ComponentRenderer, ComponentUpdater and ActionEmulator interfaces.
The source code for CustomControlProcessor can be found in
AjaxSwing/doc/ajaxswing/doc/examples directory.
|