Actually, it's an attribute, you were right the first time... :)

BTW- Is there any reason you can't use PortletRequest.getRemoteUser()? I think that's available in all PortletRequest's provided a user has been authenticated. I mean if you're casting, you may as well use the real method right?

Scott

Ryan Wynn wrote:
On 5/4/07, Ryan Wynn <[EMAIL PROTECTED]> wrote:
On 5/4/07, Nebinger, David <[EMAIL PROTECTED]> wrote:
> > First of all, it's easier to get the request map from the
> > ExternalContext:
> >
> > Map requestMap = externalContext.getRequestMap();
>
> For the http request parameters, sure you're correct.  But he's got a
> portlet and he's looking for a portlet request parameter, so he's going
> about things the correct way.

MyFacesGenericPortlet creates a special derivation of ExternalContext
for you that wraps the portlet request (and portletSession, etc).  So
getRequestMap() is going to give you a map backed by the
portletRequest parameters.  In essence alot of stuff works no matter
what container you are in, as long as you don't cast to container
specific classes.  So I would agree with Kito on the first point and
not cast specifically to PortletRequest.


Sorry I meant getRequestParameterMap() instead of getRequestMap() in
my previous post.


Reply via email to