Package org.apache.wicket.ajax
Interface AjaxRequestTarget
-
- All Superinterfaces:
ILoggableRequestHandler
,IPageClassRequestHandler
,IPageRequestHandler
,IPartialPageRequestHandler
,IRequestHandler
- All Known Implementing Classes:
AjaxRequestHandler
public interface AjaxRequestTarget extends IPartialPageRequestHandler, ILoggableRequestHandler
- Since:
- 6.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
AjaxRequestTarget.IJavaScriptResponse
Deprecated.static interface
AjaxRequestTarget.IListener
AnAjaxRequestTarget
listener that can be used to respond to various target-related eventsstatic interface
AjaxRequestTarget.ITargetRespondListener
Components can implement this interface to get a notification when AjaxRequestTarget begins to respond.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addListener(AjaxRequestTarget.IListener listener)
Adds a listener to this targetString
getLastFocusedElementId()
Returns the HTML id of the last focused element.Page
getPage()
Returns the page.void
registerRespondListener(AjaxRequestTarget.ITargetRespondListener listener)
Register the given respond listener.-
Methods inherited from interface org.apache.wicket.request.ILoggableRequestHandler
getLogData
-
Methods inherited from interface org.apache.wicket.core.request.handler.IPageClassRequestHandler
getPageClass, getPageParameters
-
Methods inherited from interface org.apache.wicket.core.request.handler.IPageRequestHandler
getPageId, getRenderCount, isPageInstanceCreated
-
Methods inherited from interface org.apache.wicket.core.request.handler.IPartialPageRequestHandler
add, add, addChildren, appendJavaScript, focusComponent, getComponents, getHeaderResponse, prependJavaScript
-
Methods inherited from interface org.apache.wicket.request.IRequestHandler
detach, respond
-
-
-
-
Method Detail
-
addListener
void addListener(AjaxRequestTarget.IListener listener)
Adds a listener to this target- Parameters:
listener
-- Throws:
IllegalStateException
- ifAjaxRequestTarget.IListener
's events are currently being fired or have both been fired already
-
registerRespondListener
void registerRespondListener(AjaxRequestTarget.ITargetRespondListener listener)
Register the given respond listener. The listener'sAjaxRequestTarget.ITargetRespondListener.onTargetRespond(org.apache.wicket.ajax.AjaxRequestTarget)
method will be invoked when theAjaxRequestTarget
starts to respond.- Parameters:
listener
-
-
getLastFocusedElementId
String getLastFocusedElementId()
Returns the HTML id of the last focused element.- Returns:
- markup id of last focused element,
null
if none
-
getPage
Page getPage()
Returns the page. Be aware that the page can be instantiated if this wasn't the case already.- Specified by:
getPage
in interfaceIPageRequestHandler
- Returns:
- page instance
-
-