handler.getPageClass(), handler.getPageParameters());
return buildUrl(urlInfo);
}
IRequestablePage page = handler.getPage();
if (!pageMustHaveBeenCreatedBookmarkable() || page.wasCreatedBookmarkable())
{
PageInfo info = null;
if (!page.isPageStateless())
{
info = new PageInfo(page.getPageId());
}
PageComponentInfo pageComponentInfo = info != null ? new PageComponentInfo(info,
null) : null;
UrlInfo urlInfo = new UrlInfo(pageComponentInfo, page.getClass(),
handler.getPageParameters());
return buildUrl(urlInfo);
}
else
{
return null;
}
}
else if (requestHandler instanceof BookmarkableListenerInterfaceRequestHandler)
{
// listener interface URL with page class information
BookmarkableListenerInterfaceRequestHandler handler = (BookmarkableListenerInterfaceRequestHandler)requestHandler;
IRequestablePage page = handler.getPage();
if (!checkPageClass(page.getClass()))
{
return null;
}
Integer renderCount = null;
if (handler.getListenerInterface().isIncludeRenderCount())
{
renderCount = page.getRenderCount();
}
PageInfo pageInfo = new PageInfo(page.getPageId());
ComponentInfo componentInfo = new ComponentInfo(renderCount,
requestListenerInterfaceToString(handler.getListenerInterface()),
handler.getComponent().getPageRelativePath(), handler.getBehaviorIndex());
UrlInfo urlInfo = new UrlInfo(new PageComponentInfo(pageInfo, componentInfo),
page.getClass(), handler.getPageParameters());
return buildUrl(urlInfo);
}
return null;
}