- 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 Summary
Modifier and TypeMethodDescriptiondefault void
onAfterRespond
(Map<String, Component> map, AjaxRequestTarget target) Triggered after the target has written components.default void
onBeforeRespond
(Map<String, Component> map, AjaxRequestTarget target) Triggered before the target begins writing components.default void
updateAjaxAttributes
(AbstractDefaultAjaxBehavior behavior, AjaxRequestAttributes attributes) Triggered for every Ajax behavior.
-
Method Details
-
onBeforeRespond
Triggered before the target begins writing components.- Parameters:
map
- modifiable map (markupId -> component) of components already added to the targettarget
- the target itself. Could be used to add components or to append/prepend JavaScript
-
onAfterRespond
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 targettarget
- the target itself. Could be used to append/prepend JavaScript
-
updateAjaxAttributes
default void updateAjaxAttributes(AbstractDefaultAjaxBehavior behavior, AjaxRequestAttributes attributes) Triggered for every Ajax behavior. Can be used to configure common settings.- Parameters:
behavior
- the behavior the attributes are updated forattributes
- The attributes for the Ajax behavior- Since:
- 7.0.0
-