cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robin Wyles <...@robinwyles.com>
Subject Re: Use cocoon properties in flow
Date Wed, 11 Jun 2008 12:27:53 GMT
Hi,

You can look up the settings bean directly like this in flow...

var settings = cocoon.getComponent 
(Packages.org.apache.cocoon.configuration.Settings.ROLE);
var prop = settings.getProperty("my.property.name");
...
cocoon.releaseComponent(settings);

Cheers,

Robin


On 11 Jun 2008, at 09:30, Carlos Martínez wrote:

> Hello,
>
> Thanks for the response.
>
> Now i'm using this solucion but i want to know if it's possible to  
> get directly the variables in the flowscript.
>
> Regards.
>
> DAVIGNON Andre - CETE NP/DIODé/PANDOC escribió:
>> Hi,
>>
>> If you can access it in a sitemap, you could try this to access it  
>> in the flow :
>>
>> In the sitemap :
>>
>> <map:call function="myFonction">
>> 	<map:parameter name="someName" value="${my-variable}">
>> </map:call>
>>
>> Then in the flow :
>>
>> var myVariable = cocoon.parameters.someName;
>>
>> Regards.
>>
>> Andr�
>>
>>
>> Le 10/06/2008 07:51, > Carlos Mart�nez (par Internet, d�p�t  
>> users-return-95314-andre.davignon=developpement- 
>> durable.gouv.fr@cocoon.apache.org) a �crit  :
>> > Hello,
>> > > I have created a properties file with some interesting  
>> variables in the > folder "WEB-INF/properties". I access this  
>> variables in the sitemap easy > using this notation "${my- 
>> variable}". But the problem is how to access > the same varible in  
>> the flowscript code.
>> > > Thanks.
>> > >  
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> > For additional commands, e-mail: users-help@cocoon.apache.org
>> > > >
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>>
>>
>
>
> -- 
> ====================================================================== 
> ==
> Carlos Martínez Peña
> Centre de Tecnologies de la Informació
> Universitat de les Illes Balears
> Cra. Valldemossa km 7.5 E-07122 Palma
> Baleares  Spain
>
> tel.: +34 971 17 20 32  		 e-mail: carlos.martinez@uib.es  
> ====================================================================== 
> ==
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


Mime
View raw message