cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KOZLOV Roman <r-koz...@opencascade.com>
Subject Re: Session attribute change within aggregation
Date Fri, 12 Apr 2002 15:47:25 GMT
Thank you very much for the lesson. I'll try another way.
    Roman

Vadim Gritsenko wrote:

> > From: KOZLOV Roman [mailto:r-kozlov@opencascade.com]
> >
> > Hello,
> >
> >     Vadim thank you for your advice. It helped me. I was busy some
> time and
> > had postponed this problem. Unfortunatelly it still remains.
> >     I've found out that WildcardSessionAttributeMatcher (I'm using
> Cocoon
> > 2.0.1) doesn't see session attributes changed or created before in the
> same
> > request by some xsp
>
> XSP *cannot* create session attributes *before* action invocation in the
> *same* request because:
>
>    -----------------------------------------------------------
>    XSP is executed *after* *all* actions, matchers, selectors.
>    -----------------------------------------------------------
>
> Request is being processed by sitemap in *two* steps:
>
>   1) Construct pipeline
>   2) Execute pipeline
>
> All matchers/selectors/actions are executed in step one; all
> generators/serializers/transformers are executed in step two.
>
> Hope this helps
>
> Vadim
>
> > (I'm using aggregation of xsp and "cocoon://somepattern"
> > which includes branch based on sessionstate matcher).
> >     It seems that objectModel are not up to date at the processing of
> > WildcardSessionAttributeMatcher.getMatchString method.
> >     Is it a known problem?
> >
> >     I've tested it so: first, I call an aggregation which first part
> is an
> > xsp setting and printing session attribute "isChanged" and second part
> is
> > call to a pipeline via cocoon protocol wich returns some data if
> > sessionstate matcher recognize that "isChanged" is "yes", otherwise
> calls
> > xsp which prints a value of the session attribute "isChanged":
> >
> >  <map:match pattern="read_filtered_results">
> >    <map:match type="sessionstate" pattern="yes">
> >        <map:parameter name="attribute-name" value="isChanged"/>
> >        <map:generate src="cocoon://read_query_results"/>
> >        <map:serialize type="xml"/>
> >    </map:match>
> >    <map:generate src="cocoon://check_idlist_1.xsp"/>
> >    <map:serialize type="xml"/>
> >  </map:match>
> >
> >     Despite the first xsp in aggregation _always_ sets the session
> attribute
> > "isChanged" to "yes" or "no" (and first time it is "yes"), in the
> > sitemap.log for the first call I always see:
> >  HttpProcessor[8080][4]/WildcardSessionAttributeMatcher: Session
> attribute
> > 'isChanged' not set.
> >
> >     Though the second xsp (check_id_list_1.xsp), which is called in
> this
> > case, always prints correct value.
> >
> >     So the problem is an organizing of a branch in sitemap according
> to a
> > change of some session attribute calculated in xsp. Here "isChanged"
> > attribute is just a flag.
> >
> >     Thank you for any response.
> >         Roman
> >
> ...
>
> ---------------------------------------------------------------------
> 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