Hello,

I am trying to copy a window from a page in the portal to the current 
navigation page and the window is not rendered after it addition.


  | PortalObject object = 
JBPServiceLocator.getPortalObjectContainer().getObject(sourceWindowPortalObject);
  |                                                             
System.out.println("Trying to add " + object.getName());
  |                                                             Window window = 
(Window) object;
  |                                                             Page page = 
(Page) pagePortalObject;
  | 
  |                                                             String 
regionName = "center-top-wide";
  |                                                             String string = 
window.getName() + "xyz";
  |                                                             
  |                                                             PortalObject 
copy = window.copy(page, string, false);
  |                                                             Window child = 
(Window) page.getChild(string);
  |                                                             
child.setDeclaredProperty(ThemeConstants.PORTAL_PROP_REGION, regionName);
  |                                                             
  |                                                             for(Object obj 
: page.getChildren()){
  |                                                                     if(obj 
instanceof Window){
  |                                                                             
Window po = (Window) obj;
  |                                                                             
System.out.println("po " + po.getName());
  |                                                                     }
  |                                                             }
  | 
  | I am sure that the layout of the page has the region that is assigned to 
the new window.
  | 
  | After the copy the new window appears as a child of the page.
  | 
  | Is there anything else that I need to do to get the window to render?
  | 
  | Thank you

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

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

Reply via email to