Package org.apache.wicket.ajax
Interface AjaxRequestTarget.IListener
-
- All Known Implementing Classes:
AjaxEnclosureListener
- 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 Modifier and Type Method Description default void
onAfterRespond(java.util.Map<java.lang.String,Component> map, AjaxRequestTarget.IJavaScriptResponse response)
Triggered after ajax request target is done with its response cycle.default void
onBeforeRespond(java.util.Map<java.lang.String,Component> map, AjaxRequestTarget target)
Triggered before ajax request target begins its response cycledefault void
updateAjaxAttributes(AbstractDefaultAjaxBehavior behavior, AjaxRequestAttributes attributes)
Triggered for every Ajax behavior.
-
-
-
Method Detail
-
onBeforeRespond
default void onBeforeRespond(java.util.Map<java.lang.String,Component> map, AjaxRequestTarget target)
Triggered before ajax request target begins its response cycle- 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
default void onAfterRespond(java.util.Map<java.lang.String,Component> map, AjaxRequestTarget.IJavaScriptResponse response)
Triggered after ajax request target is done with its response cycle. At this point only additional javascript can be output to the response using the providedAjaxRequestTarget.IJavaScriptResponse
object NOTE: During this stage of processing any calls to target that manipulate the response (adding components, javascript) will have no effect- Parameters:
map
- read-only map:markupId->component of components already added to the targetresponse
- response object that can be used to output 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
-
-