Hi Kent,

Indeed the URL is hybrid but only the component info is actually used.
Since the page is stateless the page is not stored and the next
request recreates a new instance of this page class and uses the
component info (e.g. ILinkListener-form-link) to find the link and
execute its onClick method.

Maybe we can optimize this a bit by changing the page id to -1 and
don't do the lookup by page id when the link is clicked.
I.e. the generated url for components in stateless page will look
like: -1-1.ILinkListener-form-link

I'll experiment with that.

On Tue, Sep 13, 2011 at 9:00 AM, Kent Tong <[email protected]> wrote:
> Hi,
>
> In 1.5 I found that even if a page is stateless, Wicket still generates
> hybrid URLs (with PageInfo) for stateless links/forms. This is done in
> AbstractBookmarkableMapper (see below). Any idea why? Thanks!
>
>
> if (requestHandler instanceof BookmarkableListenerInterfaceRequestHandler)
> {
>        // listener interface URL with page class information
>        BookmarkableListenerInterfaceRequestHandler handler =
> (BookmarkableListenerInterfaceRequestHandler)requestHandler;
>        Class<? extends IRequestablePage> pageClass = handler.getPageClass();
>        if (!checkPageClass(pageClass))
>        {
>                return null;
>        }
>        Integer renderCount = null;
>        if (handler.getListenerInterface().isIncludeRenderCount())
>        {
>                renderCount = handler.getRenderCount();
>        }
>        PageInfo pageInfo = new PageInfo(handler.getPageId());
>        ComponentInfo componentInfo = new ComponentInfo(renderCount,
>        requestListenerInterfaceToString(handler.getListenerInterface()),
>                                handler.getComponentPath(),
>                                handler.getBehaviorIndex());
>        UrlInfo urlInfo = new UrlInfo(new PageComponentInfo(pageInfo,
> componentInfo),
>                                pageClass, handler.getPageParameters());
>        return buildUrl(urlInfo);
> }
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to