public static UIPage toUIPage(String pageRef, UIComponent uiParent) throws Exception {
UserPortalConfigService configService = uiParent.getApplicationComponent(UserPortalConfigService.class);
PageContext pageContext = configService.getPage(PageKey.parse(pageRef));
Page page = configService.getDataStorage().getPage(pageRef);
pageContext.update(page);
return toUIPage(page, uiParent);
}
public static UIPage toUIPage(Page page, UIComponent uiParent) throws Exception {
UIPage uiPage = Util.getUIPortal().findFirstComponentOfType(UIPage.class);