This content has been marked as final.
Show 1 reply
-
1. Re: Get window name or page name
rivetlogic Jan 13, 2009 9:15 AM (in response to snon)Hi,
Note: This applies to JBoss Portal 2.6.x. I haven't tried with 2.4.x. I am also using FacesContext since this is for a JSF portlet.
You should be able to get the window and page names using the JBossRenderRequest like so:// Get render request object that contains needed info JBossRenderRequest req = (JBossRenderRequest) FacesContext.getCurrentInstance() .getExternalContext().getRequest(); // Extract window name for this portlet String windowName = req.getPortalNode().getName(); // Extract page name for this window String pageName = req.getPortalNode().getParent().getName();
I also have a blog entry that shows how to get the portal name if you're interested. Here's the link:
http://blogs.rivetlogic.com/aelnattar/2009/01/12/how-to-get-the-jboss-portal-window-name-page-name-and-portal-name-for-a-jsf-portlet/
Hope this helps,
--Alaaeldin