Re: TemplateDirectiveModel question

Daniel Dekany <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Saturday, November 1, 2008, 8:47:48 AM, Luther Baker wrote:

> I am creating a sort of custom component via the TemplateDirectoryModel.
>
> Before manually stuffing the web context into a global var, is
> there a well-defined way to grab the web context from somewhere
> within the TemplateDirectoryModel.execute method?
>
> For example, I want to create a PageLink type of component -
> similar to Tapestry - but as links get more nested - linking to a
> root level page seems tricky without /context access.
>
> Thanks for any input,

Given that FreeMarker is not Servlet-aware or even HTTP-aware, there
is no dedicated way of doing that. Usually, such field-specific
context info is stuffed into the Data Model or into the Environment
with setCustomAttribute by the Web Application Framework.

> -Luther

-- 
Best regards,
 Daniel Dekany


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.