You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ma...@swisscom.com on 2003/03/07 09:37:43 UTC
for
I try to get each text field (paranameX) where X are the text fields
from the previous page :
...
<esql:query>
INSERT INTO Process_Parameters
(pp_process, pp_pmid, pp_name)
VALUES
...,
<'xsp-request:get-parameter><xsp:attribute
name="name">paraname<xsp:expr>mycount</xsp:expr>
</xsp:attribute></xsp-request:get-parameter>')
...
<xsp:logic>
mycount = mycount + 1;
</xsp:logic>
...
This line :
<'xsp-request:get-parameter><xsp:attribute
name="name">paraname<xsp:expr>mycount</xsp:expr>
</xsp:attribute></xsp-request:get-parameter>')
Gives me the following error :
org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.NullPointerException
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: for
Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 07.Mar.2003 -- 10:11 AM, Yves Vindevogel wrote:
> I face the same problem.
>
> Untill now, I have found no way to "dynamically" generate parameters.
> The <xsp-request:get-parameter> must always include the "name" attribute.
> Assigning an <xsp:attribute> never seems to work for me either.
>
> I was trying to work around this with the tags
> <xsp-request:get-parameter-names> and <xsp-request:get-parameter-values>
> The names thing works (returning all the params in xml format or string)
> but the values always came up empty.
>
> I'm still looking for a solution to this problem.
> So I will keep listening.
Please read the docs carefully:
xsp:attribute This element is used to dynamically provide attribute
values for a given element. This tag is typically used in conjunction
with <xsp:expr>, where the substituted expression is always cast to
String
First, let's be reminded that an XSP is turned into a generator. Now,
"element" above referrs to *an element generated by this generator*.
IOW not an element of this XML document you're currently editing!
See http://xml.apache.org/cocoon/userdocs/xsp/logicsheet-concepts.html
for a discussion of this problem.
The logicsheet in question has to support dynamic attributes. There is
no overall method to do this independantly.
However, most logicsheets use the logicsheet-utils.xsl templates. Thus
for a logicsheet bound to the namespace prefix "foo"
<foo:param name="bar"><xsp:expr>yada</xsp:expr></foo:param>
works. E.g.
<xsp-request:get-parameter>
<xsp-request:param name="name"><xsp:expr>pname</xsp:expr></xsp-request:param>
</xsp-request:get-parameter>
But this works usually only on selected parameters. See the logicsheet
in question for details.
Chris.
--
C h r i s t i a n H a u l
haul@informatik.tu-darmstadt.de
fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: for
Posted by Yves Vindevogel <yv...@implements.be>.
I face the same problem.
Untill now, I have found no way to "dynamically" generate parameters.
The <xsp-request:get-parameter> must always include the "name" attribute.
Assigning an <xsp:attribute> never seems to work for me either.
I was trying to work around this with the tags
<xsp-request:get-parameter-names> and <xsp-request:get-parameter-values>
The names thing works (returning all the params in xml format or string)
but the values always came up empty.
I'm still looking for a solution to this problem.
So I will keep listening.
> I try to get each text field (paranameX) where X are the text fields
> from the previous page :
>
> ...
> <esql:query>
> INSERT INTO Process_Parameters
> (pp_process, pp_pmid, pp_name)
> VALUES
> ...,
> <'xsp-request:get-parameter><xsp:attribute
> name="name">paraname<xsp:expr>mycount</xsp:expr>
> </xsp:attribute></xsp-request:get-parameter>')
> ...
> <xsp:logic>
> mycount = mycount + 1;
> </xsp:logic>
> ...
>
>
> This line :
> <'xsp-request:get-parameter><xsp:attribute
> name="name">paraname<xsp:expr>mycount</xsp:expr>
> </xsp:attribute></xsp-request:get-parameter>')
>
> Gives me the following error :
> org.apache.cocoon.ProcessingException: Exception in
> ServerPagesGenerator.generate(): java.lang.NullPointerException
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
--
Met vriendelijke groeten,
Kind regards,
Bien à vous,
Yves Vindevogel
Implements
Kempische Steenweg 206 -- 3500 Hasselt -- Belgium
Phone/Fax: +32 (11) 43.55.76 -- Mobile: +32 (478) 80.82.91
Mail: yves.vindevogel@implements.be -- www.implements.be
Quote: The winner never says participating is more important than winning.
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
AW: for
Posted by Marco Rolappe <m_...@web.de>.
the <xsp:attribute> on the <xsp-request:get-parameter> is not possible; it's
translated to java code and first executed when generation starts, i.e. when
the <xsp-request:get-parameter> has already been translated.
but you should be able to use following:
<xsp-request:get-parameter><name>paraname<xsp:expr>mycount</xsp:expr></name>
</xsp-request:get-parameter>
> -----Ursprungliche Nachricht-----
> Von: cocoon-users-return-47407-m_rolappe=web.de@xml.apache.org
> [mailto:cocoon-users-return-47407-m_rolappe=web.de@xml.apache.org]Im
> Auftrag von Maxime.Gheysen@swisscom.com
> Gesendet: Freitag, 7. Marz 2003 09:38
> An: cocoon-users@xml.apache.org
> Betreff: <xsp:attribute> for <xsp-request:get-parameter>
>
>
> I try to get each text field (paranameX) where X are the text fields
> from the previous page :
>
> ...
> <esql:query>
> INSERT INTO Process_Parameters
> (pp_process, pp_pmid, pp_name)
> VALUES
> ...,
> <'xsp-request:get-parameter><xsp:attribute
> name="name">paraname<xsp:expr>mycount</xsp:expr>
> </xsp:attribute></xsp-request:get-parameter>')
> ...
> <xsp:logic>
> mycount = mycount + 1;
> </xsp:logic>
> ...
>
>
> This line :
> <'xsp-request:get-parameter><xsp:attribute
> name="name">paraname<xsp:expr>mycount</xsp:expr>
> </xsp:attribute></xsp-request:get-parameter>')
>
> Gives me the following error :
> org.apache.cocoon.ProcessingException: Exception in
> ServerPagesGenerator.generate(): java.lang.NullPointerException
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org