cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Max Larsson" <max.lars...@gmservice.de>
Subject RE: [Serializer] Get request and parameters?
Date Wed, 12 Dec 2001 11:20:03 GMT
Hi,

actually i don't know.
I never coded a serialzer, but when i did
a Transformer i had a similiar problem
and solved it with that method. And there should
be a mezthod in a Serialzer so that you can get access
to the request object. Maybe its named different.
I have no time now to take a deeper look, will
do it tomorrwor.

Wait for More

Max

> -----Original Message-----
> From: Stephan Michels [mailto:stephan@vern.chem.tu-berlin.de]
> Sent: Mittwoch, 12. Dezember 2001 12:02
> To: cocoon-users@xml.apache.org
> Subject: RE: [Serializer] Get request and parameters?
> 
> 
> 
> 
> On Wed, 12 Dec 2001, Max Larsson wrote:
> 
> > hi,
> >
> > i think it works, wour class has to implement the avalon interface,
> > which contains the setup method (see below). if you 
> implement it, the
> > method will be called each time your Serialzer is used. In 
> the setup method
> > you can retrieve the request object the so called ComponentManage.
> > objectModel in my source.
> > Of cousre there is lot missing in the snipet below.
> >
> > HTH
> >
> > Max
> >
> >
> > Code snipet:
> >
> >   public void setup( SourceResolver resolver,Map 
> objectModel,String source,
> > Parameters paras )
> >     throws ProcessingException,SAXException,IOException {
> >
> >     request  = (Request)(objectModel.get( 
> Constants.REQUEST_OBJECT ) );
> >     response = (Response)(objectModel.get( 
> Constants.RESPONSE_OBJECT ) );
> >   }
> >
> 
> Which avalon interface do you mean?
> org.apache.avalon.framework.component.Component? I think the 
> setup method
> owns the org.apache.cocoon.sitemap.SitemapModelComponent.
> 
> In my example of a serializer the setup method doesn't work.
> 
> public abstract class DOMSerializer extends AbstractSerializer
>   implements Cacheable, Composable, Configurable, 
> SitemapModelComponent
> {
> 
>   public void setup(SourceResolver resolver, Map objectModel, 
> String src,
>                     Parameters par)
>   {
>     System.out.println("DOMSerializer.java: setup");
>   }
> [...]
> 
> 
> > > -----Original Message-----
> > > From: Stephan Michels [mailto:stephan@vern.chem.tu-berlin.de]
> > > Sent: Mittwoch, 12. Dezember 2001 11:01
> > > To: cocoon-users@xml.apache.org
> > > Subject: [Serializer] Get request and parameters?
> > >
> > >
> > > Hi,
> > > exists a way to get the request and the request parameters in a
> > > serialzier? AbstractGenerator and AbstractTransformer implements
> > > the interface SitemapModelComponent. If I implement
> > > SitemapModelComponent
> > > in my serializer it will ignored.
> > >
> > > And SitemapOutputComponent doesn't implement a method like
> > > setup. Doesn't
> > > implements SitemapOutputComponent this method on purpose.
> > >
> > > Thanks, Stephan Michels.
> 
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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