cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Dam <d....@hippo.nl>
Subject Re: Contacting input modules from jx
Date Wed, 09 Aug 2006 06:52:52 GMT
Why not pass the values from the sitemap?

i.e.:

<map:generate src="someFile.xml" type="jx">
  <map:parameter name="someValue" value="{request-param:someValue}"/>
</map:generate>

I consider it best practice to state all the input values to processing 
components specifically in the sitemap. It provides a nice overview of 
all the values that could change the outcome of a JXTemplate.

Or do you have a specific reason not to pass them from the sitemap?

Dennis

Thorsten Scherler wrote:
> El lun, 07-08-2006 a las 08:20 -0700, Mark Lundquist escribió:
>   
>> 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.
>>     
>
> Actually I am using standalone jx-template without flow. Meaning I
> cannot pass the inputModule into the template.
>
>   
>> 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 :-)
>>
>>     
>
> jeje, like said above I do not have flow. 
>
> Thanks for your response.
>
> salu
>
>   
>> peace,
>> —ml—
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>     


-- 

Hippo
Oosteinde 11
1017WT Amsterdam
The Netherlands
Tel  +31 (0)20 5224466
-------------------------------------------------------------
d.dam@hippo.nl / http://www.hippo.nl
-------------------------------------------------------------- 


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


Mime
View raw message