You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "Keshavan, Rango" <ra...@fmr.com> on 2007/12/26 03:21:28 UTC
Request paramater on an Render return from an Action request
Hi,
I have a problem. I need to send back on the ServletRequest a parameter
when I have an Action call. I know there is an
ActionResponse.setRenderParameter() method, but that doesn't put it on
the Request, it puts it on the RenderRequest for that particular
portlet. I'm trying to read this in a valve and decide upon certain
actions if that parameter is there.
Does anyone have any ideas?
Thanks!
Rango Keshavan
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
Re: Request paramater on an Render return from an Action request
Posted by David Sean Taylor <da...@bluesunrise.com>.
On Dec 25, 2007, at 6:21 PM, Keshavan, Rango wrote:
> Hi,
>
> I have a problem. I need to send back on the ServletRequest a
> parameter
> when I have an Action call. I know there is an
> ActionResponse.setRenderParameter() method, but that doesn't put it on
> the Request, it puts it on the RenderRequest for that particular
> portlet. I'm trying to read this in a valve and decide upon certain
> actions if that parameter is there.
>
> Does anyone have any ideas?
>
You can add the parameter easily enough, although the portlet api
doesn't support this directly:
<form action="<%=myAction%>?x1=123" method="POST">
and then pull the parameter off in any valve up to and including the
action valve:
public void invoke(RequestContext request, ValveContext context)
throws PipelineException
{
boolean responseCommitted = false;
try
{
// example
String x1 = request.getRequestParameter("x1");
System.out.println("x1=" + x1);
System.out.println("query string=" + request.getRequest
().getQueryString());
If you need to pass on your query string to portlets, set these two
parameters in jetspeed.properties:
#-----------------------------------------------------------------------
-----------
# Until version 2.1, Jetspeed merged portal request parameters with
portlet specific
# parameters, effectively allowing "shared" parameters.
# This is not compliant with the JSR-168 PLT.11, so by default this
is now disabled.
#
# By setting merge.portal.parameters.with.portlet.parameters=true
this feature can
# be "restored".
# In the situation of portal and portlet parameters with the same
name, by default
# the portlet parameters will be provided first in the values array,
but this too
# can be overridden by setting
merge.portal.parameters.before.portlet.parameters=true
#
# Setting both these properties to true will deliver the "old"
pre-2.1 behavior.
# Note: for individual portlets, these global settings can be
overridden by setting
# these properties as metadata in jetspeed-portlet.xml
#-----------------------------------------------------------------------
-----------
merge.portal.parameters.with.portlet.parameters=true
merge.portal.parameters.before.portlet.parameters=false