Interface AjaxRequestTarget.IListener

All Known Implementing Classes:
AjaxEnclosureListener, MultipartFormComponentListener
Enclosing interface:
AjaxRequestTarget

public static interface AjaxRequestTarget.IListener
An AjaxRequestTarget listener that can be used to respond to various target-related events
  • Method Details

    • onBeforeRespond

      default void onBeforeRespond(Map<String,Component> map, AjaxRequestTarget target)
      Triggered before the target begins writing components.
      Parameters:
      map - modifiable map (markupId -> component) of components already added to the target
      target - the target itself. Could be used to add components or to append/prepend JavaScript
    • onAfterRespond

      default void onAfterRespond(Map<String,Component> map, AjaxRequestTarget target)
      Triggered after the target has written components. At this point only additional JavaScript can be added to the response. NOTE: During this stage of processing any calls that manipulate components will result in an exception. After notification of all listeners no JavaScript can be added any longer.
      Parameters:
      map - read-only map:markupId->component of components already added to the target
      target - the target itself. Could be used to append/prepend JavaScript
    • updateAjaxAttributes

      Triggered for every Ajax behavior. Can be used to configure common settings.
      Parameters:
      behavior - the behavior the attributes are updated for
      attributes - The attributes for the Ajax behavior
      Since:
      7.0.0