You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Carlos Dias <cd...@pontoc.pt> on 2004/04/22 19:23:56 UTC
Passing parameters to aggregation parts
Hi,
In my sitemap a have the following code fragment:
<map:aggregate element="page">
<map:part src="conf/reportmenu.xml" strip-root="false"/>
<map:part src="cocoon:/select_bookmark_list.xsp" strip-root="false">
<map:parameter name="user_id" value="{1}"/>
<map:parameter name="app_id" value="{2}"/>
</map:part>
</map:aggregate>
When I try to access the "user_id" and "app_id" inside the XSP file the values are null, but I
know that the values are not null. I never see an example of passing parameters to the parts
of an aggregation, but it seems to make sense.
Thanks in advance,
Carlos Dias
Re: Passing parameters to aggregation parts
Posted by Carlos Dias <cd...@pontoc.pt>.
It's something like:
<map:match pattern="test-*-*">
CDias
----- Original Message -----
From: "Jorg Heymans" <jh...@domek.be>
To: <us...@cocoon.apache.org>
Sent: Thursday, April 22, 2004 10:03 PM
Subject: Re: Passing parameters to aggregation parts
> what does your map:match look like?
>
> Carlos Dias wrote:
> > Jorg,
> > Thanks for the answer, but still doesn't work!!
> >
> > CDias
> > ----- Original Message -----
> > From: "Jorg Heymans" <jh...@domek.be>
> > To: <us...@cocoon.apache.org>
> > Sent: Thursday, April 22, 2004 6:35 PM
> > Subject: Re: Passing parameters to aggregation parts
> >
> >
> >
> >>
> >>Carlos Dias wrote:
> >>
> >>>Hi,
> >>>In my sitemap a have the following code fragment:
> >>><map:aggregate element="page">
> >>> <map:part src="conf/reportmenu.xml" strip-root="false"/>
> >>> <map:part src="cocoon:/select_bookmark_list.xsp"
strip-root="false">
> >>> <map:parameter name="user_id" value="{1}"/>
> >>> <map:parameter name="app_id" value="{2}"/>
> >>> </map:part>
> >>></map:aggregate>
> >>>
> >>>When I try to access the "user_id" and "app_id" inside the XSP file the
> >>>values are null, but I
> >>
> >>OTTOMH : did you try value="../{1}" and value="../{2}" ?
> >>
> >>Jorg
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> >>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Passing parameters to aggregation parts
Posted by Jorg Heymans <jh...@domek.be>.
what does your map:match look like?
Carlos Dias wrote:
> Jorg,
> Thanks for the answer, but still doesn't work!!
>
> CDias
> ----- Original Message -----
> From: "Jorg Heymans" <jh...@domek.be>
> To: <us...@cocoon.apache.org>
> Sent: Thursday, April 22, 2004 6:35 PM
> Subject: Re: Passing parameters to aggregation parts
>
>
>
>>
>>Carlos Dias wrote:
>>
>>>Hi,
>>>In my sitemap a have the following code fragment:
>>><map:aggregate element="page">
>>> <map:part src="conf/reportmenu.xml" strip-root="false"/>
>>> <map:part src="cocoon:/select_bookmark_list.xsp" strip-root="false">
>>> <map:parameter name="user_id" value="{1}"/>
>>> <map:parameter name="app_id" value="{2}"/>
>>> </map:part>
>>></map:aggregate>
>>>
>>>When I try to access the "user_id" and "app_id" inside the XSP file the
>>>values are null, but I
>>
>>OTTOMH : did you try value="../{1}" and value="../{2}" ?
>>
>>Jorg
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail: users-help@cocoon.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Passing parameters to aggregation parts
Posted by Carlos Dias <cd...@pontoc.pt>.
Jorg,
Thanks for the answer, but still doesn't work!!
CDias
----- Original Message -----
From: "Jorg Heymans" <jh...@domek.be>
To: <us...@cocoon.apache.org>
Sent: Thursday, April 22, 2004 6:35 PM
Subject: Re: Passing parameters to aggregation parts
>
>
> Carlos Dias wrote:
> > Hi,
> > In my sitemap a have the following code fragment:
> > <map:aggregate element="page">
> > <map:part src="conf/reportmenu.xml" strip-root="false"/>
> > <map:part src="cocoon:/select_bookmark_list.xsp" strip-root="false">
> > <map:parameter name="user_id" value="{1}"/>
> > <map:parameter name="app_id" value="{2}"/>
> > </map:part>
> > </map:aggregate>
> >
> > When I try to access the "user_id" and "app_id" inside the XSP file the
> > values are null, but I
>
> OTTOMH : did you try value="../{1}" and value="../{2}" ?
>
> Jorg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Passing parameters to aggregation parts
Posted by Jorg Heymans <jh...@domek.be>.
Carlos Dias wrote:
> Hi,
> In my sitemap a have the following code fragment:
> <map:aggregate element="page">
> <map:part src="conf/reportmenu.xml" strip-root="false"/>
> <map:part src="cocoon:/select_bookmark_list.xsp" strip-root="false">
> <map:parameter name="user_id" value="{1}"/>
> <map:parameter name="app_id" value="{2}"/>
> </map:part>
> </map:aggregate>
>
> When I try to access the "user_id" and "app_id" inside the XSP file the
> values are null, but I
OTTOMH : did you try value="../{1}" and value="../{2}" ?
Jorg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Passing parameters to aggregation parts
Posted by Carlos Dias <cd...@pontoc.pt>.
Thanks Jan...
I will try it...
CDias
----- Original Message -----
From: Jan Hoskens
To: users@cocoon.apache.org ; Carlos Dias
Sent: Friday, April 23, 2004 8:23 AM
Subject: Re: Passing parameters to aggregation parts
When calling a pipeline, you can't pass parameters (As far as I know).
I had the same problem a while ago. I then just passed the parameters as
request parameters by calling
src="cocoon:/Pipeline/mypage.jsp?firstparam={1}". Another option is to set
your parameters in a session by invoking an action before generating
anything.
Though I also think it makes sense to use parameters with aggregate parts, maybe even for internal pipelines, but only resources seem
to accept parameters.(unless there are changes in the cvs head, I'm working with 2.1.4 release) There may have been a discussion about this topic on the dev maillist, if you want some more info it's worth a look.
Kind Regards,
Jan
----- Original Message -----
From: Carlos Dias
To: users@cocoon.apache.org
Sent: Thursday, April 22, 2004 7:23 PM
Subject: Passing parameters to aggregation parts
Hi,
In my sitemap a have the following code fragment:
<map:aggregate element="page">
<map:part src="conf/reportmenu.xml" strip-root="false"/>
<map:part src="cocoon:/select_bookmark_list.xsp" strip-root="false">
<map:parameter name="user_id" value="{1}"/>
<map:parameter name="app_id" value="{2}"/>
</map:part>
</map:aggregate>
When I try to access the "user_id" and "app_id" inside the XSP file the values are null, but I
know that the values are not null. I never see an example of passing parameters to the parts
of an aggregation, but it seems to make sense.
Thanks in advance,
Carlos Dias
Re: Passing parameters to aggregation parts
Posted by Jan Hoskens <jh...@schaubroeck.be>.
When calling a pipeline, you can't pass parameters (As far as I know).
I had the same problem a while ago. I then just passed the parameters as
request parameters by calling
src="cocoon:/Pipeline/mypage.jsp?firstparam={1}". Another option is to set
your parameters in a session by invoking an action before generating
anything.
Though I also think it makes sense to use parameters with aggregate parts, maybe even for internal pipelines, but only resources seem
to accept parameters.(unless there are changes in the cvs head, I'm working with 2.1.4 release) There may have been a discussion about this topic on the dev maillist, if you want some more info it's worth a look.
Kind Regards,
Jan
----- Original Message -----
From: Carlos Dias
To: users@cocoon.apache.org
Sent: Thursday, April 22, 2004 7:23 PM
Subject: Passing parameters to aggregation parts
Hi,
In my sitemap a have the following code fragment:
<map:aggregate element="page">
<map:part src="conf/reportmenu.xml" strip-root="false"/>
<map:part src="cocoon:/select_bookmark_list.xsp" strip-root="false">
<map:parameter name="user_id" value="{1}"/>
<map:parameter name="app_id" value="{2}"/>
</map:part>
</map:aggregate>
When I try to access the "user_id" and "app_id" inside the XSP file the values are null, but I
know that the values are not null. I never see an example of passing parameters to the parts
of an aggregation, but it seems to make sense.
Thanks in advance,
Carlos Dias
Re: Passing parameters to aggregation parts
Posted by la...@marinepower.com.
Here is what I use :
<xsp:logic>
String paramname = parameters.getParameter("PARAM_NAME",
"-DEFAULT-");
</xsp:logic>
Other used the <xsp:util> but sometimes encounter problems
Laurent
"Carlos Dias" <cd...@pontoc.pt>
22/04/2004 19:23
Please respond to users
To: <us...@cocoon.apache.org>
cc:
Subject: Passing parameters to aggregation parts
Hi,
In my sitemap a have the following code fragment:
<map:aggregate element="page">
<map:part src="conf/reportmenu.xml" strip-root="false"/>
<map:part src="cocoon:/select_bookmark_list.xsp" strip-root="false">
<map:parameter name="user_id" value="{1}"/>
<map:parameter name="app_id" value="{2}"/>
</map:part>
</map:aggregate>
When I try to access the "user_id" and "app_id" inside the XSP file the
values are null, but I
know that the values are not null. I never see an example of passing
parameters to the parts
of an aggregation, but it seems to make sense.
Thanks in advance,
Carlos Dias