cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Edwards <tedwa...@civica.com.au>
Subject Re: Obtaining sitemap globals in flow
Date Thu, 16 Jun 2005 06:09:55 GMT
Geert,
Thanks for that. That actual method call is 
"Packages.org.apache.cocoon.components.modules.input.InputModule.ROLE" 
but you  got me off and running in the right direction!!!


Thansk agian,
Tony

Geert Josten wrote:

> Hi,
>
> Not yet? ;-)
>
> But you can do something like:
>
> var global = cocoon.getComponent(InputModule.ROLE + 
> "Selector").select("global");
> var webdavSource = global.getAttribute("webdav-source",null,null);
>
> Cheers,
> Geert
>
> Tony Edwards wrote:
>
>> Hi folks,
>> Is there a simple way of obtaining a variable set up in the sitemap 
>> <global-variables> section?
>> At the moment I'm passing the value through every time a flow 
>> function is called which can't be good:
>>        <map:match pattern="*.do">
>>            <map:call function="main">
>>                <map:parameter name="page" value="{1}" />
>>                 <map:parameter name="webdav-source" 
>> value="{global:webdav-source}"/>
>>            </map:call>
>>        </map:match>
>>    </map:pipeline> and referencing this in my flow thusly:
>>
>>    print("Global thing: " + cocoon.parameters["webdav-source"]);
>>
>> Is there a "cocoon.sitemap.globals("webdav-source")" type method 
>> lurking anywhere????
>>
>> thanks
>>
>> Tony
>>
>> ---------------------------------------------------------------------
>> 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


Mime
View raw message