Gell, Ashley wrote:

I am using Cocoon 2.1.1

As illustrated by the sample pipeline below, I have a navigate action which determines, among other things, the buttons to be displayed on the page. The current page is passed into the navigate action, which is used to determine and return the buttons parameter to the pipeline indicating which buttons xsl to apply.

I now have a requirement that, depending on the result of a 'createService.xsp' (running <map:generate type="serverpages" src="{../1}/xsp/{../2}.xsp"/>) different buttons to those returned by the navigate action need to be displayed. This could be achieved, I am hoping, by the XSP over writing the 'buttons' parameter returned by the navigate action by returning the 'buttons' parameter itself.

Any ideas?

since the action completes first, then the pipeline is setup (ie the transformers are determined are the pipeline parts are connected) is done before a single line of your generator is executed (well, the setup method is, actually, only the generate() method isn't) there is no way to communicate in the desired direction. You could perhaps compute the value in the setup method and communicate through request attributes.


IMHO and without knowng more about your concrete application your should start a new design iteration and try to group functionality and keep concerns separated.

<map:match pattern="*/*.xsp">
<map:act type="xsp-action" src="{1}/xsp-action/navigate.xsp">
<map:parameter name="currPage" value="{2}.xsp"/>
<map:generate type="serverpages" src="{../1}/xsp/{../2}.xsp"/>
<map:transform type="xslt" src="{../1}/style/{../2}.xsl"/>
<map:transform type="xslt" src="common/style/{buttons}.xsl"/>
<map:serialize/>
</map:act>
<map:generate type="serverpages" src="common/xsp/invalidpage.xsp"/>
<map:transform type="xslt" src="common/style/invalidpage.xsl"/>
<map:transform type="xslt" src="common/style/pagestyle.xsl"/>
<map:serialize/>


</map:match>

-- C h r i s t i a n H a u l [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to