JBoss Portal 2.7.0-cr1

I have a PortalNode via JBossRenderRequest.getPortalNode();
I want to create a Page programmaticly under this node, to do that I need a 
PortalObject (Page) instance.

Is there any easy way to do that, for example a PortalObject 
getPortalObjectFor(PortalNode node) function?:

  | PortalNode currentNode = request.getPortalNode();
  | PortalNode pageNode = currentNode .getParent();
  | Page pageObj = (Page)getPortalObjectFor(pageNode);
  | Page newPage = pageObj.createPage(...);
  | 


Or do I have to do it the hard way?:


  | PortalNode currentNode = request.getPortalNode();
  | PortalNode pageNode = currentNode.getParent();
  | 
  | // get name of pageNode's parents
  | ...
  | 
  |                 MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
  |                 container = (PortalObjectContainer) 
MBeanProxy.get(PortalObjectContainer.class, new 
ObjectName("portal:container=PortalObject"), mbeanServer);
  |                 Context ctx = container.getContext();
  | 
  | //using the names of pageNode's parents - get the PortalObject from the 
Context's children's children.
  | ...
  | 

Thanks, John

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4195377
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to