This content has been marked as final.
Show 3 replies
-
1. Re: portal navigation
julien1 Sep 21, 2005 5:55 PM (in response to martin.d)There is such an API in JBoss Portal 2.2 that allows you to browse the envirnnment in which a portlet is triggered and create link to those objects.
There is something similar in 2.0 but which is less powerfull and will be deprecated. -
2. Re: portal navigation
jlaskowski Sep 22, 2005 6:32 AM (in response to martin.d)Could you elaborate more on the API in JP2.2? I'm just curious what's there.
Jacek -
3. Re: portal navigation
julien1 Sep 22, 2005 7:39 AM (in response to martin.d)to access the current node being used (a window node) :
org.jboss.portlet.PortalNode node = org.jboss.portlet.Navigation.getCurrentNode();
then you can navigate around that node with methods like// get the page node.getParent(); // get sibbling windows node.getParent().getChildren(); // get a specific window node.resolve("../anotherwindow");
you can test the node type :if (node.getType() == PortalNode.TYPE_WINDOW) { // }
and you can create links to a node :PortalNodeURL url = ((JBossRenderResponse)req).createRenderURL(node); writer.write("<a href='" + url.toString + "'>link</a>");
You can see it in action in the CatalogPortlet in 2.2 which displays the pages relative to the target page or can display a sitemap in maximized window state.