This content has been marked as final.
Show 2 replies
-
1. Re: how to get PortalRuntimeContext from portlets
apemberton Apr 27, 2009 5:41 AM (in response to aspdeepak)You should be able to access the PortalRuntimeContext using the Navigation class's static accessor:
PortalRuntimeContext prc = Navigation.getPortalRuntimeContext();
See: http://anonsvn.jboss.org/repos/portal/tags/JBoss_Portal_2_7_2/core/src/main/org/jboss/portal/core/aspects/controller/node/Navigation.java
Though, I'm not sure why you'd be "afraid" of using the PortletSession.APPLICATION_SCOPE - as this is defined by the JSR168/286 spec, whereas the PortalRuntimeContext is a JBoss-specific API.
I'd encourage you to either investigate using the APPLICATION_SCOPE or because you're on Portal 2.7, look into the JSR286 event coordination features.
Using these features will lead to more spec-compliant, portable, and possibly more maintainable code. -
2. Re: how to get PortalRuntimeContext from portlets
aspdeepak May 1, 2009 3:55 AM (in response to aspdeepak)thank you apemberton for your reply.
Your suggestion really worked.