You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Vadim Gritsenko <va...@reverycodes.com> on 2004/02/16 21:53:31 UTC
JXTemplate Generator Variables
Hi all,
Documentation [1] states that JXTemplate generator has cocoon.request /
cocoon.session / etc variables declared to access request/session/etc.
And, that it has request / session / etc variables that also provide
access to the similar objects.
Now, the issue is that JXTemplate generator, actually, does not /always/
provide template with cocoon.xxx variables. In reality, it provides
these variables if, and only if, template has been invoked from within
the flow. This makes me conclude that, either:
(a) request/response/etc variables can not be deprecated, as they
are the only reliable way to get hold of request/response/etc. Cocoon
needs templating capabilities regardless of flow.
or
(b) cocoon.request/cocoon.response etc implementation is not
complete yet, and this is a bug in current implementation.
So, what statement is correct - (a) or (b)?
Vadim
[1] http://cocoon.apache.org/2.1/userdocs/flow/jxtemplate.html
Re: JXTemplate Generator Variables
Posted by Christopher Oliver <re...@verizon.net>.
Vadim Gritsenko wrote:
> Hi all,
>
> Documentation [1] states that JXTemplate generator has cocoon.request
> / cocoon.session / etc variables declared to access
> request/session/etc. And, that it has request / session / etc
> variables that also provide access to the similar objects.
>
> Now, the issue is that JXTemplate generator, actually, does not
> /always/ provide template with cocoon.xxx variables. In reality, it
> provides these variables if, and only if, template has been invoked
> from within the flow. This makes me conclude that, either:
> (a) request/response/etc variables can not be deprecated, as they
> are the only reliable way to get hold of request/response/etc. Cocoon
> needs templating capabilities regardless of flow.
> or
> (b) cocoon.request/cocoon.response etc implementation is not
> complete yet, and this is a bug in current implementation.
>
> So, what statement is correct - (a) or (b)?
(a) If you don't use flow, there is no FOM, so it makes no sense to have
access to it using cocoon.xxx.
JXTemplate was originally designed specifically to be used from a
flowscript. If you want to use it in some other way some design changes
are probably required.
HTH,
Chris