cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hunsberger, Peter" <Peter.Hunsber...@stjude.org>
Subject RE: Make continuation id available to all XSLTs
Date Wed, 24 Dec 2003 17:23:19 GMT
Sylvain Wallez <sylvain@apache.org> writes:

> 
> Hunsberger, Peter wrote:
> 
> >We've finally got around to playing with 2.1 and we're in 
> the process 
> >of converting some of our application to use flow (yeah!).  
> We've got a 
> >huge locally developed forms infrastructure that I've talked 
> about here 
> >in the past.  Basically, it's not going to migrate to any 
> other forms 
> >infrastructure (aka cForms) anytime soon.  However flow 
> migration would 
> >be good, even necessary for us but I've run into two things 
> that seem 
> >to be holding us back in using it. I'll post the 2nd issue 
> separately.
> >
> >In order to generically adapt any pipeline to use flow you need a 
> >continuation id for any form action (POST) you might create.  
> >Strangely, it seems this is not readily available from the 
> >TraxTransformer?  We ended up wrapping the TraxTransformer 
> with our own 
> >and extending a couple of methods, the code being stolen from the 
> >JPathTransformer
> >
> >    private WebContinuation m_kont;
> >
> >    public void setup(SourceResolver resolver, Map 
> objectModel, String 
> >src, Parameters parameters)
> >        throws ProcessingException, SAXException, IOException
> >    {
> >        super.setup(resolver, objectModel, src, parameters);
> >        m_kont = FlowHelper.getWebContinuation( objectModel );
> >    }
> >
> >    protected Map getLogicSheetParameters() {
> >        Map params = super.getLogicSheetParameters();
> >        if ( m_kont != null )
> >        {
> >            String id = m_kont.getContinuation(0).getId();
> >            if ( id != null )
> >                params.put( "cocoon-continuation-id", id );
> >        }
> >        return params;
> >    }
> >
> >It seems however, that the availability of the continuation 
> id should 
> >be part of the base TraxTransformer since it would be 
> generally useful?
> >  
> >
> 
> I wouldn't go that way, as it breaks the cacheability of the 
> TraxTransformer. Currently, the cache validity is composed of every 
> <map:parameter> and every request parameter if 
> "use-request-parameters" 
> is true.
> 
> If you publish the continuation id to the stylesheet, you have to 
> include it in the validity also, or you may experience 
> problems due to 
> the pipeline getting the content of the cache.
 
Hmm, true, hadn't started to worry about that....

> On the other hand, I don't think that stylesheets generally need the 
> continuation id, and that always including it would make many 
> pipelines 
> non-cacheable when they actually are.
> 
> As a conclusion, I think it's better to pass the continuation id as a 
> <map:parameter> where needed...

All right, I'll bite, how would you go about doing that?  That was my
first thought but I couldn't find a way to do that...


Mime
View raw message