cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lundquist ...@wrinkledog.com>
Subject Re: Contacting input modules from jx
Date Mon, 07 Aug 2006 15:20:30 GMT

On Aug 5, 2006, at 3:43 PM, Thorsten Scherler wrote:

> I am looking for a comfortable way to contact input modules from within
> my jx:templates. Something like
> http://cocoon.apache.org/2.1/userdocs/concepts/modules.html#Step+2b: 
> +Use
> +it+on+an+XSP
> ...
> <p> Parameter name=<input:get-attribute module="request-param"
>                        as="string" name="module" default="John Doe"/>;  
> </p>
>
> Does somebody knows how to do it in jx?

You could always pass the InputModule into the JXTemplate, then call  
getAttribute() on it using the JExL syntax:

	${someInputModule.getAttribute ( 'foo')}

I assume you're invoking the JXTG pipeline from flow, e.g. calling  
cocoon.sendPage() from flowscript?  Then you can inject the InputModule  
directly from flowscript by including it in the context bean passed to  
sendPage()... see the other current thread with topic "Accessing XML  
File input module inside a flowscript" for an explanation of how to  
obtain the InputModule within flowscript.

Though I'm curious why you want your JX Template to  know about an  
InputModule... I prefer JX Templates to be as "dumb" as possible,  
getting all their data from the flow context bean :-)

peace,
—ml—


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


Mime
View raw message