You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Nacho Jimenez <na...@ya.com> on 2004/05/11 17:29:09 UTC

How to... use input modules inside a pipeline.

    Hello,

    I'm refurbishing my app from xsp to flowscript, and   I often abuse 
the XSP input logicsheet  to access different input module values from 
inside a pipeline. Mostly, they're request and session context values, 
but sometimes I use other input modules as well.

    At first I thought  I could make do with the JXTemplateTransformer, 
but I have no clue on how to access a session context (not a simple 
session) from JXPath, or how to access the rest of the input modules 
(xmlfile is quite usefull for dirty tricks).
   
    I need  to find a  way to inject those values into the pipeline. 
Someone has an idea on how?
    I'd also like to know the best way to retrieve those values from 
flowscript... Again, I kknow how to get the session, or the request, but 
what about the session contexts? Is there a way to access them without 
creating  the avalon component?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: How to... use input modules inside a pipeline.

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On May 11, 2004, at 8:29 AM, Nacho Jimenez wrote:

>
>    Hello,
>
>    I'm refurbishing my app from xsp to flowscript, and   I often abuse 
> the XSP input logicsheet  to access different input module values from 
> inside a pipeline. Mostly, they're request and session context values, 
> but sometimes I use other input modules as well.
>
>    At first I thought  I could make do with the JXTemplateTransformer, 
> but I have no clue on how to access a session context (not a simple 
> session) from JXPath, or how to access the rest of the input modules 
> (xmlfile is quite usefull for dirty tricks).

You don't want to access those things in your JX template.  You want to 
use JXT for its intended usage, which is to take data pushed in from 
flowscript and insert that data into a template.  If you want data 
coming from <somewhere> in your JX template, the answer is always to go 
through flowscript.

You can always take data from an input module in the sitemap and supply 
it to a flowscript function as a parameter.

>      I need  to find a  way to inject those values into the pipeline.

Use the session-context input module (see 
http://cocoon.apache.org/2.1/developing/webapps/contexts.html, at the 
very bottom)

>  Someone has an idea on how?
>    I'd also like to know the best way to retrieve those values from 
> flowscript...

Supply the values as parameters in the call to the flowscript function.

~mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org