cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: [RT] The API for the request object
Date Tue, 06 Jul 2004 15:14:00 GMT
Unico Hommes wrote:

> Carsten Ziegeler wrote:
>
>> Sylvain Wallez wrote:
>>  
>>
>>> Big +1 , but what about naming it getSitemapPath() to mimic 
>>> HttpServletRequest.getServletPath()?
>>>
>>>   
>>
>> Hm, sounds better to me, but we have used "prefix" everywhere else.
>> Ok, I like your suggestion more.
>>
>>  
>>
>
> <snip/>
>
>
>>> <SNIP/>
>>>
>>> What about adding a list of ProcessingListeners to the object model, 
>>> which can be augmented by the various components that participate in 
>>> request handling, and is called at particular places such as:
>>> - processing start (such listeners must be registered in the xconf),
>>> - sitemap mount,
>>> - end of pipeline building,
>>> - start of pipeline execution (differs from the previous one as it 
>>> may not be called if the result is cached)
>>> - end of pipeline execution
>>> - end of processing
>>>
>>> That would allow e.g. a flowscript to register a listener that 
>>> closes a hibernate session once the processing is terminated, thus 
>>> allowing the same session to be used in the view.
>>>
>>>   
>>
>> Yes, something like that. I would like to have some dynamics in
>> the listener concept, so I can add at run time a listener. This would
>> solve the problem as well.
>
>
> This almost sounds like components configurable from the sitemap.
>
> <map:sitemap>
>  <map:listeners>
>    <map:listener class="MyListener"/>
>  </map:listeners>
> </map:sitemap>


Yep. Those are "static" listeners, i.e. ones that will always be called. 
We also need to be able to dynamically add listeners that may be 
required by the various components involved the processing chain, and 
which cannot be determined statically. Something actually similar to 
CForm's Field value change listeners, that can be defined in the form 
definition, but can also be added on a particular field instance.

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


Mime
View raw message