You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Torsten Curdt <tc...@dff.st> on 2001/07/24 11:11:41 UTC

environment

Can anyone give me a hint...

How do I get the environment within an action?
Within act it is probably the SourceResolver, right?!
(may I up-cast the SorceResolver to Environment?)

Anyway, this will not help...
I want to use the cocoon: url in configure()

Possible so far?

Thanks
--
Torsten

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


Re: environment

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 24.Jul.2001 -- 11:11 AM, Torsten Curdt wrote:
> Anyway, this will not help...
> I want to use the cocoon: url in configure()
> 
> Possible so far?

Don't think so. When configure() is invoked, this particular sitemap
hasn't been setup properly, yet.

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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


AW: environment

Posted by Carsten Ziegeler <cz...@sundn.de>.
> Torsten Curdt wrote:
> 
> Can anyone give me a hint...
> 
> How do I get the environment within an action?
> Within act it is probably the SourceResolver, right?!
> (may I up-cast the SorceResolver to Environment?)
> 
Yes, but casting is a bad idea. And to get a url
you only need the SourceResolver and not the Environment.

> Anyway, this will not help...
> I want to use the cocoon: url in configure()
> 
> Possible so far?
> 
Putting it simple: No.

As there is more and more need in having the SourceResolver
available everywhere (especially during configuration),
I started several days ago the thread about using a
ThreadLocal variable to put the SourceResolver in.
I thought of a public instance variable of the Cocoon class,
e.g. Cocoon.localSourceResolver or something like that.
The Cocoon class itself could set this whenever the process()
method is invoked, but this might be too late for some
components as they are configured earlier on.

Carsten

> Thanks
> --
> Torsten
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 

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