On 1/07/2010 23:18, tomasz bandura wrote:
> Hi Bob,
> 
> I also noticed that links work after at least invocation ( initialization)
> So if i put a link to the table element manually it will work.
> 
> It looks like the page and link are registered after initialization
> (onInit() ??)


Don't think so. At startup time Click maps all pages to templates. When the 
Context is used to
lookup the page by path (and the page path cannot be found) Click attempts to 
lookup the page again.
Note this is strictly development behavior. Once the page mapping has been 
established, it will be
cached, and table links will start working. So the loading depends on *when* 
the Context is used to
retrieve the page.

You'll also note different behavior from getContext().getPagePath(PAge.class) 
and
getContext().getPageClass("home.htm").  Looking up by getPagePath won't perform 
the "lazy load",
while getPageClass does.

Regardless my hope is that GAE fixes the issue with getResourcePaths("/"). 
Barring a fix we can use
some convention such as placing templates under 'page' or 'pages'.

I've updated the JPA-example[1] to place templates under 'page' folder and it 
seems to work fairly
well. Note this change hasn't been checked in so it is not available yet.

Kind regards

Bob

[1]: http://click-jpa.appspot.com/page/home.htm

Reply via email to