Package org.apache.wicket.ajax
Interface AjaxRequestTarget.IListener
-
- All Known Implementing Classes:
AjaxEnclosureListener
,MultipartFormComponentListener
- Enclosing interface:
- AjaxRequestTarget
public static interface AjaxRequestTarget.IListener
AnAjaxRequestTarget
listener that can be used to respond to various target-related events
-
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default void
onAfterRespond(Map<String,Component> map, AjaxRequestTarget target)
Triggered after the target has written components.default void
onAfterRespond(Map<String,Component> map, AjaxRequestTarget.IJavaScriptResponse response)
Deprecated.implementonAfterRespond(Map, AjaxRequestTarget)
insteaddefault 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 Detail
-
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 targettarget
- the target itself. Could be used to add components or to append/prepend JavaScript
-
onAfterRespond
@Deprecated default void onAfterRespond(Map<String,Component> map, AjaxRequestTarget.IJavaScriptResponse response)
Deprecated.implementonAfterRespond(Map, AjaxRequestTarget)
insteadTriggered 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.- Parameters:
map
- read-only map:markupId->component of components already added to the targetresponse
- response object that can be used to output 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 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
-
-