cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lionel Crine <cr...@4dconcept.fr>
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 ?

Lionel



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:
>
>ObjectModelHelper.getContext();
>ObjectModelHelper.getRequest();
>ObjectModelHelper.getResponse();
>
>Charles Y
>
>Lionel Crine wrote:
>
>>Hello,
>>
>>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.
>>
>>thanks
>>
>>
>>Lionel
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>>For additional commands, e-mail: cocoon-users-help@xml.apache.org
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org


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


Mime
View raw message