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.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3896306#3896306

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3896306


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to