cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lionel Crine <>
Subject Re: extends my custom class
Date Tue, 22 Apr 2003 15:00:18 GMT
I explain a little more :

In my custom generator, there is a "setup" method which get the objectmodel.

public void setup(SourceResolver resolver, Map objectModel, String src, 
Parameters par)
         throws ProcessingException, SAXException, IOException {
         super.setup(resolver, objectModel, src, par);
//Here I do a getContext
Context context = ObjectModelHelper.getContext(objectModel);
//then i get some variable
this.domain = context.getInitParameter("domain");

BUT I have some action, transformers, generators which launch, each time I 
called them, the "getContext" method.

So I'm creating a class that instanced this variables in the context. But 
in this class this ObjectModel Object does not exist.

To get it I need to extends a cocoon class, which one ?


At 07:43 22/04/2003 -0700, you wrote:
>Hello Lionel,
>     I'm not sure I understand your question.  All methods in 
> ObjectModelHelper are static so you have access to them from any object:
>Charles Y
>Lionel Crine wrote:
>>I need to use the "ObjectModelHelper" object into my custom class. But 
>>this class is not a generator or a transformer so I don't want to extends 
>>it anyhow. This class initialize variables and methods use by the custom 
>>generator and transformer.
>>Which class should I extend to get the "ObjectModelHelper" object.
>>To unsubscribe, e-mail:
>>For additional commands, e-mail:
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message