cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geert Josten <Geert.Jos...@daidalos.nl>
Subject Re: Obtaining sitemap globals in flow
Date Thu, 16 Jun 2005 07:58:51 GMT
Oh, yeah. I probably did an importPackage first, I guess..

:-P

Tony Edwards wrote:

> 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
> 
> 

-- 
=====================================
NB: het Daidalos kantoor is sinds 22 april
jl. gevestigd op een nieuw adres:

Daidalos BV
Hoekeindsehof 1 - 4
2665 JZ Bleiswijk
tel: +31 (0)10 850 12 00
fax: +31 (0)10 850 11 99

Bovenstaand adres is tevens het postadres.
======================
Geert.Josten@Daidalos.nl
IT-consultant at Daidalos BV

http://www.daidalos.nl/

GPG: 1024D/12DEBB50

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


Mime
View raw message