Question

78
Views
Close popover
Dan Shell (DanS7319)
Student

Student
US
DanS7319 Member since 2020 14 posts
Student
Posted: September 24, 2020
Last activity: November 9, 2020

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?

***Edited by Moderator Marissa to update Platform Capability tags****
Pega Platform 8.2.2 Data Integration Cross-Industry System Architect