cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Re: Use of <xsp:attribute> when calling a logicsheet
Date Tue, 09 Jan 2001 19:28:43 GMT
Werner Guttmann <Werner.Guttmann@msdw.com> wrote:
>I am about to implement my own tag library for an inhouse systems which
>we'd like to control from within Cocoon. I've got the tag library
>working as in that it successfully does what it is supposed to be doing,
>e.g. start and stopping RMI subsystems.
>
>There's one odd thing, though, when I try to use this tag library.
>Issueing
>
><spider:manageSubsystem service="MQ" action="stop" />
>
>i.e. hardcoding servicename and the action to executed, everything works
>fine and the specified RMI subsystem is successfully stopped. When I try
>to create one or both of these attributes using <xsp:attribute>, things
>do not work.
>
>Issuing
>
><spider:manageSubsystem>
>   <xsp:attribute name="service">MQ</xsp:attribute>
>   <xsp:attribute name="action">stop</xsp:attribute>
></spider:manageSubsystem>
>
>never passes the attributes to the logicsheet. Any idea why, or what I
>am doing wrong here ?

XSP produces Producers which are then executed. The Producers contain your 
actual Java code. <xsp:attribute> is replaced with some Java code which 
applies to the output document of the Producer. You are trying to modify the 
generation of the Producer, while the Producer is running - but at that 
stage, the Producer has already been generated so you can't!

Instead you need to either

(1) not use xsp:attribute but make your logicsheet treat the attribute value 
as a Java expression. This should work fine.

or (2) use elements instead of attributes and use the get-nested-content 
template from ESQL - this is the best solution because you can nest 
arbitrary levels of taglibs as long as they all use get-nested-content and 
don't interfere with each other.


_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


Mime
View raw message