cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luke Studley <Luke.Stud...@cerillion.com>
Subject RE: Can I access to the requets parameters from tag-lib?
Date Sat, 08 Dec 2001 01:04:14 GMT
As I understand it the 'tag-lib' or logic sheet is applied to your XSP page
to generate another XSP page recursively through all logic sheets until you
finally end up with a java class which is then compiled. Therefore your
logic sheets don't directly deal with requests - they generate code that
deals with requests.

Luke

-----Original Message-----
From: Sergio Navarro [mailto:sng2@alu.ua.es] 
Sent: 08 December 2001 00:43
To: cocoon-users@xml.apache.org
Subject: Can I access to the requets parameters from tag-lib?

Can I access to the requets parameters from  a tag-lib?

I've created a tag-lib: "pccom-util" and inside I need an xsl-variable with
request parameter, to know what xsp code to generate.

I've tried to declare xslt transformer with this line:
    <use-request-parameters>true</use-request-parameters>

but it isn't taken effect with the tag-libs. It seems to be because server
pages generator isn't use this specification for the xslt-transformer that
it employs to apply the tag-lib.

Another solution that I've tried is:

<xsp:page
  xmlns:xsp="http://apache.org/xsp"
  xmlns:pccom-util="http://www.pccom.es/pccom-util"
  xmlns:xsp-request="http://apache.org/xsp/request/2.0"
  language="java">


<pccom-util:origenes pagina="ficha">
<xsp:element name="pccom-util:origenDatosFicha">
       <xsp:attribute name="contenido">
            <xsp-request:get-parameter name="contenido"/>
       </xsp:attribute>
        <xsp:attribute name="id">
           <xsp-request:get-parameter name="id"/></xsp:attribute>
       </xsp:element>
</pccom-util:origenes>

But it fails because I would need to execute 2 times the xsp code.
One to put the request parameter into the attribute of my tag. And another
to execute my tag with these parameters.

Any idea???

THANKS and please be patient with my english



---------------------------------------------------------------------
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