Create embedded page in Java
I am using java functions and activities to create embedded pages.
I use variations on this code:
////
tools.createPage("@baseclass", "PageName");
ClipboardPage page = tools.findPage("PageName");
ClipboardProperty prop = tools.getProperty("TopLevelPage.propName");
prop.setValue(page);
///or if a prop is a list
prop.add(page);
////
The problem is that the pages are created as top level pages first then duplicated to the property value. The original top level pages remain on the clipboard. Is there a way to avoid creating them as top level pages in the first place? Or do I need to remove them manually afterwards?