org.apache.wicket.core.request.handler
Class BookmarkableListenerInterfaceRequestHandler

java.lang.Object
  extended by org.apache.wicket.core.request.handler.BookmarkableListenerInterfaceRequestHandler
All Implemented Interfaces:
IComponentRequestHandler, IPageClassRequestHandler, IPageRequestHandler, IRequestHandler

public class BookmarkableListenerInterfaceRequestHandler
extends Object
implements IPageRequestHandler, IComponentRequestHandler

Request handler for bookmarkable pages with listener interface. This handler is only used to generate URLs. Rendering is always handled by ListenerInterfaceRequestHandler.

Author:
Matej Knopp

Constructor Summary
BookmarkableListenerInterfaceRequestHandler(IPageAndComponentProvider pageComponentProvider, RequestListenerInterface listenerInterface, Integer behaviorIndex)
          Construct.
BookmarkableListenerInterfaceRequestHandler(PageAndComponentProvider pageComponentProvider, RequestListenerInterface listenerInterface)
          Construct.
 
Method Summary
 void detach(IRequestCycle requestCycle)
           
 Integer getBehaviorIndex()
          Returns index of behavior this listener is targeted on or null if component is the target
 IRequestableComponent getComponent()
          Returns the component instance.
 String getComponentPath()
          Returns the page relative path to the component instance.
 RequestListenerInterface getListenerInterface()
          Returns the listener interface.
 IRequestablePage getPage()
          Returns the page.
 Class<? extends IRequestablePage> getPageClass()
          Returns the page class
 Integer getPageId()
          Returns the page id.
 PageParameters getPageParameters()
           
 Integer getRenderCount()
          Returns the number of times this page has been rendered.
 boolean isPageInstanceCreated()
          Checks if the page instance is already created or if it will be created when IPageRequestHandler.getPage() is called
 void respond(IRequestCycle requestCycle)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BookmarkableListenerInterfaceRequestHandler

public BookmarkableListenerInterfaceRequestHandler(IPageAndComponentProvider pageComponentProvider,
                                                   RequestListenerInterface listenerInterface,
                                                   Integer behaviorIndex)
Construct.

Parameters:
pageComponentProvider -
listenerInterface -
behaviorIndex -

BookmarkableListenerInterfaceRequestHandler

public BookmarkableListenerInterfaceRequestHandler(PageAndComponentProvider pageComponentProvider,
                                                   RequestListenerInterface listenerInterface)
Construct.

Parameters:
pageComponentProvider -
listenerInterface -
Method Detail

getComponent

public IRequestableComponent getComponent()
Description copied from interface: IComponentRequestHandler
Returns the component instance.

Specified by:
getComponent in interface IComponentRequestHandler
Returns:
component instance
See Also:
IComponentRequestHandler.getComponent()

getComponentPath

public final String getComponentPath()
Description copied from interface: IComponentRequestHandler
Returns the page relative path to the component instance.

Specified by:
getComponentPath in interface IComponentRequestHandler
Returns:
the page relative path to the component instance

getPage

public IRequestablePage 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 interface IPageRequestHandler
Returns:
page instance
See Also:
IPageRequestHandler.getPage()

getPageClass

public Class<? extends IRequestablePage> getPageClass()
Description copied from interface: IPageClassRequestHandler
Returns the page class

Specified by:
getPageClass in interface IPageClassRequestHandler
Returns:
page class
See Also:
IPageClassRequestHandler.getPageClass()

getPageId

public Integer getPageId()
Description copied from interface: IPageRequestHandler
Returns the page id.

Specified by:
getPageId in interface IPageRequestHandler
Returns:
page id
See Also:
IPageRequestHandler.getPageId()

getPageParameters

public PageParameters getPageParameters()
Specified by:
getPageParameters in interface IPageClassRequestHandler
Returns:
page parameters
See Also:
IPageClassRequestHandler.getPageParameters()

detach

public void detach(IRequestCycle requestCycle)
Specified by:
detach in interface IRequestHandler
See Also:
IRequestHandler.detach(org.apache.wicket.request.IRequestCycle)

getListenerInterface

public RequestListenerInterface getListenerInterface()
Returns the listener interface.

Returns:
listener interface

getBehaviorIndex

public Integer getBehaviorIndex()
Returns index of behavior this listener is targeted on or null if component is the target

Returns:
behavior index or null

respond

public void respond(IRequestCycle requestCycle)
Specified by:
respond in interface IRequestHandler
See Also:
IRequestHandler.respond(org.apache.wicket.request.IRequestCycle)

isPageInstanceCreated

public final boolean isPageInstanceCreated()
Description copied from interface: IPageRequestHandler
Checks if the page instance is already created or if it will be created when IPageRequestHandler.getPage() is called

Specified by:
isPageInstanceCreated in interface IPageRequestHandler
Returns:
true iff page instance is already created

getRenderCount

public final Integer getRenderCount()
Description copied from interface: IPageRequestHandler
Returns the number of times this page has been rendered.

Specified by:
getRenderCount in interface IPageRequestHandler
Returns:
the render count of the page
See Also:
IRequestablePage.getRenderCount()


Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.