Module org.apache.wicket.core
Class BookmarkableListenerRequestHandler
java.lang.Object
org.apache.wicket.core.request.handler.BookmarkableListenerRequestHandler
- All Implemented Interfaces:
IComponentRequestHandler
,IPageClassRequestHandler
,IPageRequestHandler
,IRequestHandler
public class BookmarkableListenerRequestHandler
extends Object
implements IPageRequestHandler, IComponentRequestHandler
Request handler for bookmarkable pages with an
IRequestListener
. This handler is only used to
generate URLs. Rendering is always handled by ListenerRequestHandler
.- Author:
- Matej Knopp
-
Constructor Summary
ConstructorDescriptionBookmarkableListenerRequestHandler
(IPageAndComponentProvider pageComponentProvider, Integer behaviorIndex) Construct.BookmarkableListenerRequestHandler
(PageAndComponentProvider pageComponentProvider) Construct. -
Method Summary
Modifier and TypeMethodDescriptionvoid
detach
(IRequestCycle requestCycle) This method is called at the end of a request cycle to indicate that processing is done and that cleaning up of the subject(s) of this target may be done.Returns index of behavior this listener is targeted on ornull
if component is the targetReturns the component instance.final String
Returns the page relative path to the component instance.getPage()
Returns the page.Class<? extends IRequestablePage>
Returns the page classReturns the page id.final Integer
Returns the number of times this page has been rendered.boolean
final boolean
Checks if the page instance is already created or if it will be created whenIPageRequestHandler.getPage()
is calledvoid
respond
(IRequestCycle requestCycle) Generates a response.
-
Constructor Details
-
BookmarkableListenerRequestHandler
public BookmarkableListenerRequestHandler(IPageAndComponentProvider pageComponentProvider, Integer behaviorIndex) Construct.- Parameters:
pageComponentProvider
-behaviorIndex
-
-
BookmarkableListenerRequestHandler
Construct.- Parameters:
pageComponentProvider
-
-
-
Method Details
-
includeRenderCount
-
getComponent
Description copied from interface:IComponentRequestHandler
Returns the component instance.- Specified by:
getComponent
in interfaceIComponentRequestHandler
- Returns:
- component instance
-
getComponentPath
Description copied from interface:IComponentRequestHandler
Returns the page relative path to the component instance.- Specified by:
getComponentPath
in interfaceIComponentRequestHandler
- Returns:
- the page relative path to the component instance
-
getPage
Description copied from interface:IPageRequestHandler
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
-
getPageClass
Description copied from interface:IPageClassRequestHandler
Returns the page class- Specified by:
getPageClass
in interfaceIPageClassRequestHandler
- Returns:
- page class
-
getPageId
Description copied from interface:IPageRequestHandler
Returns the page id.- Specified by:
getPageId
in interfaceIPageRequestHandler
- Returns:
- page id
-
getPageParameters
- Specified by:
getPageParameters
in interfaceIPageClassRequestHandler
- Returns:
- page parameters
-
detach
Description copied from interface:IRequestHandler
This method is called at the end of a request cycle to indicate that processing is done and that cleaning up of the subject(s) of this target may be done.- Specified by:
detach
in interfaceIRequestHandler
- Parameters:
requestCycle
- the current request cycle
-
getBehaviorIndex
Returns index of behavior this listener is targeted on ornull
if component is the target- Returns:
- behavior index or
null
-
respond
Description copied from interface:IRequestHandler
Generates a response.- Specified by:
respond
in interfaceIRequestHandler
- Parameters:
requestCycle
- the current request cycle
-
isPageInstanceCreated
Description copied from interface:IPageRequestHandler
Checks if the page instance is already created or if it will be created whenIPageRequestHandler.getPage()
is called- Specified by:
isPageInstanceCreated
in interfaceIPageRequestHandler
- Returns:
true
iff page instance is already created
-
getRenderCount
Description copied from interface:IPageRequestHandler
Returns the number of times this page has been rendered.- Specified by:
getRenderCount
in interfaceIPageRequestHandler
- Returns:
- the render count of the page
- See Also:
-