int id = getBehaviorId(behaviour);
Page page = getPage();
IRequestHandler handler;
if (page.isPageStateless())
{
PageAndComponentProvider provider = new PageAndComponentProvider(page.getPageId(),
page.getPageClass(), page.getPageParameters(), page.getRenderCount(),
getPageRelativePath());
handler = new BookmarkableListenerInterfaceRequestHandler(provider, listener, id);
}
else
{
PageAndComponentProvider provider = new PageAndComponentProvider(page, this);
handler = new ListenerInterfaceRequestHandler(provider, listener, id);
}
return getRequestCycle().urlFor(handler);
}