portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyce, Keith Garry" <KeithGarry.Bo...@bcbsma.com>
Subject RE: Feature Request: allow httpServletRequest parameters to be convertedinto render parameters on a particular portlet or all portlets on a page.
Date Sat, 11 Feb 2006 21:25:39 GMT

I tried it out... It works cross session but it does not work if I shut
down the instance entirely and start it back up. Then all the info is
lost. I need the bookmark to persist across server instance startups
otherwise all the bookmarks will be lost... Is there something that can
be done for this?

Thanks,
Garry

-----Original Message-----
From: David Sean Taylor [mailto:david@bluesunrise.com]
Sent: Friday, February 10, 2006 4:50 PM
To: Jetspeed Developers List
Subject: Re: Feature Request: allow httpServletRequest parameters to be
convertedinto render parameters on a particular portlet or all portlets
on a page.

Try this out, its checked into the head:

package org.apache.jetspeed.container.state.impl;

import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import javax.portlet.PortletMode;
import javax.portlet.WindowState;

import org.apache.pluto.om.window.PortletWindow;

/**
  * HybridNavigationalState
  *
  * Only encodes render parameters that start with a given prefix
  *
  * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  * @version $Id: AbstractNavigationalState.java 333093 2005-11-13
18:42:42Z taylor $
  */
public class HybridNavigationalState extends SessionNavigationalState {
     protected String prefix;

     public HybridNavigationalState(NavigationalStateCodec codec, String
prefix)
     {
         super(codec);
         this.prefix = prefix;
     }

     public String encode(PortletWindow window, Map parameters,
PortletMode mode, WindowState state, boolean action)
     throws UnsupportedEncodingException
     {
         Map subset = new HashMap();
         Iterator params = parameters.keySet().iterator();
         while (params.hasNext())
         {
             String key = (String)params.next();
             if (key.startsWith(prefix))
             {
                 // only encode params that start with prefix
                 subset.put(key, parameters.get(key));
             }
         }
         return super.encode(window, subset, mode, state, action);
     }

     public boolean isNavigationalParameterStateFull()
     {
         return true;
     }

     public boolean isRenderParameterStateFull()
     {
         return false;
     }


}

Boyce, Keith Garry wrote:
> I would like to suggest a jetspeed2 extension. I would like a way to
> allow HttpServletRequest parameters to be converted into render
> parameters on a particular portlet or all portlets on a page.
>
>
> i.e:
> http://localhost:8080/jetspeed/portal?_pp=MyPortlet-paramName-paramVal
> ue
>
>  or 
> http://localhost:8080/jetspeed/portal?_pp=ALL-paramName-paramValue
>
> In addition I need a way from portlet to add request params to
> resulting redirected post.
>
> i.e: On a form a post occurs. Portlet action fires. In there you can
> do a response.sendRedirect. I need either a way to add request
> parameters to normal redirected URL or a way to determine what that
> normal redirected url would be so I could add the request parameters
> to it and pass it to send redirect.
>
> Is is possible?
>
> Thanks,
> Garry
>
> This message is a PRIVATE communication.
> If you are not the intended recipient, please do not read, copy, or
> use it, and do not disclose it to others. Please notify the sender of
> the delivery error by replying to this message, and then delete it
> from your system. Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
>
>
>


--
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
[office] +01 707 773-4646
[mobile] +01 707 529 9194

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


This message is a PRIVATE communication.
If you are not the intended recipient, please do not read, copy,
or use it, and do not disclose it to others. Please notify the
sender of the delivery error by replying to this message, and then
delete it from your system. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message