cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hunsberger, Peter" <Peter.Hunsber...@stjude.org>
Subject Make continuation id available to all XSLTs
Date Wed, 24 Dec 2003 16:28:26 GMT
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?

Peter Hunsberger



Mime
View raw message