X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms.ui.rap%2Fsrc%2Forg%2Fargeo%2Fcms%2Fweb%2FCmsWebEntryPoint.java;h=288069bd9de464400c934da1aab14d68a51bd760;hb=e0a9791b34d3ae703716801513efb7b75b97b789;hp=1ad09d1022ba0cac6020782245de1dcb2e45b66e;hpb=73e552d19dfd9988c59c2b0a1abac791edc9cc9a;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.cms.ui.rap/src/org/argeo/cms/web/CmsWebEntryPoint.java b/org.argeo.cms.ui.rap/src/org/argeo/cms/web/CmsWebEntryPoint.java index 1ad09d102..288069bd9 100644 --- a/org.argeo.cms.ui.rap/src/org/argeo/cms/web/CmsWebEntryPoint.java +++ b/org.argeo.cms.ui.rap/src/org/argeo/cms/web/CmsWebEntryPoint.java @@ -117,6 +117,9 @@ public class CmsWebEntryPoint implements EntryPoint, CmsView, BrowserNavigationL ui = cmsWebApp.getCmsApp().initUi(parent); ui.setData(CmsApp.UI_NAME_PROPERTY, uiName); ui.setLayoutData(CmsUiUtils.fillAll()); + // we need ui to be set before refresh so that CmsView can store UI context data + // in it. + cmsWebApp.getCmsApp().refreshUi(ui, null); } catch (Exception e) { throw new IllegalStateException("Cannot create entrypoint contents", e); } @@ -260,6 +263,24 @@ public class CmsWebEntryPoint implements EntryPoint, CmsView, BrowserNavigationL return cmsSession; } + @Override + public Object getData(String key) { + if (ui != null) { + return ui.getData(key); + } else { + throw new IllegalStateException("UI is not initialized"); + } + } + + @Override + public void setData(String key, Object value) { + if (ui != null) { + ui.setData(key, value); + } else { + throw new IllegalStateException("UI is not initialized"); + } + } + /* * EntryPoint IMPLEMENTATION */