• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

share (user/preference) data between portlets (ipc with jsr 286 ?)

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,
i am new to that great forum and a newbie in developing portlets. I hope you can help me.

I have two portlets. The first one should be the peferences Portlet.
There i use the 'PortletPreferences' Class to store user specific preferences.

The second portlet needs access to those preferences.
I tried it with the PortletSession.APPLICATION_SCOPE
In the doView() Method of portlet 1 i get the preferences and set the Attribute in the Application_Scope.

But this solution only works with an refresh of the page.
But i need those information (from the first portlet) at the first renderPhase of the second portlet.

I use Liferay 5.2.0 on Tomcat as portlet container.
So far i know liferay 5.2.0 is compatible to jsr 286 (portlet 2.0 api).
So how can i send an Message from the first portlet to the second portlet in the doview() method?

Or exist other solution of my problem? Maybe userscope/usersession/userattribute and how to use it?

Is there any description of ipc(interportlet communication)?

Sorry, for my bad english.

Thanks a ton in advance!
Best regards,
Sunny
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sunny,

Could you please let me know whether you are able to solve your issue. I am also having similar issue. I need to share portlet preferances with another portlet.

Regards
Uday
 
Michaello Maier
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Uday,
i find a solution which is working for me. But i think it could exist a better one. Hope somewone else have a better solution.

I still use the PortletSession.APPLICATION_SCOPE
For those preferences i want to set i set these preferences in all portlets.

So, if i change some values in the settings of one Portlet i define the settings within the Applicationscope in the processAction() Method.
After this method the whole page render again.

So i can access in all other portlets the attribute in the ApplicationScope and test it if it is !=null.

Then i can set the preferences for these portlets who need this preference and save it.
When you sign in, all the portlets have this setting.

Hope i could help,

best regards,
sunny


 
Hang a left on main. Then read this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic