cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mauricio Souza Lima <maurici...@terra.com.br>
Subject Re: Can I access to the requets parameters from tag-lib?
Date Mon, 10 Dec 2001 22:48:54 GMT
Hi Sergio,

  I had the same problem, XSP forces us to take a different look at
common tasks of a server page. Using taglibs is'nt so trivial and
powerful as i had thinked.

  In this case, why don't you try to solve the problem by taking the
arguments of the request direct in your taglib? If these parameters
always comes from the request, get them in your tag-lib.

  See the actions, they work with the parameters in real-time.

Hope to help ;)


-- 
Mauricio Souza Lima
Rational Consulting
mauriciosl@terra.com.br
Rua Helena, 140 / cj. 82
São Paulo - SP - Brazil
Fone / Direct: +55 11 3842-7138



Sergio Navarro wrote:
> 
> 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 file
> generator isn't use this specification for the xslt-transformer that it
> employs to apply the tag-lib.
> 
> Another solution tha 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