[jboss-dev-forums] [QA of JBoss Portal] - Re: Get window name or page name
rivetlogic
do-not-reply at jboss.com
Tue Jan 13 09:15:22 EST 2009
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
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4201393#4201393
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4201393
More information about the jboss-dev-forums
mailing list