--- On Fri, 3/18/11, anyz <[email protected]> wrote:

> From: anyz <[email protected]>
> Subject: Re: How to access Portlet Session in Header.vm
> To: "Jetspeed Users List" <[email protected]>
> Date: Friday, March 18, 2011, 6:07 AM
> Woonsan Thanks for your reply.
> Probably i couldn't make my question clear
> enough. There are basically two requirements:
> 
> 1- Header.vm shows current logged in user name for example.
> An i beleive
> this is from Portal/http session. Now i have some info in
>     Portlet session that i need to show along
> with logged in user name. So
> either header.vm should able to pick this from
>      portlet sesssion Or i need to put
> this info in portal session so
> that header.vm can get and display it. Is it right?
Header.vm is executed under portal context. So, basically it cannot get access 
to a portlet session.
If you have portal session attributes by any means, you will be able to use it 
in header.vm. This can be one of various solutions.

> 
>      If above understandings are
> correct i see Portlet Filter only place
> that has access to both portlet and portal session. And
> can
>      extract a object from portlet
> session and put in portal session. where
> header.vm can display it.
> 
> 2- There are multiple portlets on PSML page. And some of
> these display
> contents based on current active user that is set in
> session.
>     Please note portlet session is shared among
> portlets. So if i set the
> active user by double clicking in one portlet i need to
> refresh
>     whole PSMLpage to display contetns for new
> active users. Or i need to
> refresh all individual portlets. Not sure if its do able?
> 
>      Double clicking a portlet will
> send and Ajax request to server that
> will set active user in session.Then reload page to
> display
>       contents based on current active
> suer.
I have no idea how your pages are aggregated. If you do some ajax-based 
rendering for each portlet window, you will probably need to render other 
portlet windows again to make effects of session attribute changes.

> 
> Thanks
> 
> On Thu, Mar 17, 2011 at 9:36 PM, Woonsan Ko <[email protected]>
> wrote:
> 
> > You can render a portlet instantly in header.vm. For
> example,
> >
> > $jetspeed.renderPortletWindow("demo::HelloPortlet",
> "demo::HelloPortlet")
> >
> > And you will be able to share the portlet session
> attributes between
> > portlets or you can use portlet events.
> >
> > HTH,
> >
> > Woonsan
> >
> > --- On Thu, 3/17/11, anyz <[email protected]>
> wrote:
> >
> > > From: anyz <[email protected]>
> > > Subject: How to access Portlet Session in
> Header.vm
> > > To: "Jetspeed Users List" <[email protected]>
> > > Date: Thursday, March 17, 2011, 1:56 PM
> >  > I need to display some information in
> > > Header.vm that is set by a portlet.
> > > For example double click on one of the table row
> displayed
> > > in Portlet and it
> > > refreshes the page. When reloaded it needs to
> show the
> > > record number in
> > > Header.vm file.
> > >
> > > I have checked that in VM file we can access the
> attribtues
> > > set in http
> > > session or Portal Session but not one set in
> Portlet
> > > Session.  I tried
> > > following code:
> > >
> > >   #foreach($item in
> > >
> $renderRequest.getPortletSession().getAttributeNames())
> > >    $item
> > >   #end
> > > But it prints only one attribute in portlet
> session and
> > > that is used by
> > > Jetspeed it self.
> > >
> > > Thanks
> > >
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to