X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms.ui%2Fsrc%2Forg%2Fargeo%2Fcms%2Futil%2FSimpleErgonomics.java;h=505d482f3befd2e9de8a9ee35c3ce210c0d42661;hb=7fa402d36e0e194424589f4d7efeae5610d2c6eb;hp=a16587a2268d7c864bdcabc2287fba4329496722;hpb=5857e869a5760aeb6de2c32d32ed4de3e28b42b6;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.cms.ui/src/org/argeo/cms/util/SimpleErgonomics.java b/org.argeo.cms.ui/src/org/argeo/cms/util/SimpleErgonomics.java index a16587a22..505d482f3 100644 --- a/org.argeo.cms.ui/src/org/argeo/cms/util/SimpleErgonomics.java +++ b/org.argeo.cms.ui/src/org/argeo/cms/util/SimpleErgonomics.java @@ -50,7 +50,9 @@ public class SimpleErgonomics extends AbstractCmsEntryPoint { parent.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); parent.setLayout(CmsUtils.noSpaceGridLayout()); - // createAdminArea(parent); + uxContext = new SimpleUxContext(); + if (!getUxContext().isMasterData()) + createAdminArea(parent); headerArea = new Composite(parent, SWT.NONE); headerArea.setLayout(new FillLayout()); GridData headerData = new GridData(SWT.FILL, SWT.FILL, false, false); @@ -61,7 +63,6 @@ public class SimpleErgonomics extends AbstractCmsEntryPoint { bodyArea.setData(RWT.CUSTOM_VARIANT, CmsStyles.CMS_BODY); bodyArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); bodyArea.setLayout(CmsUtils.noSpaceGridLayout()); - uxContext = new SimpleUxContext(); uiInitialized = true; refresh(); } @@ -111,8 +112,9 @@ public class SimpleErgonomics extends AbstractCmsEntryPoint { try { Node node = getNode(); if (node == null) - throw new CmsException("Context cannot be null"); - uiProvider.createUi(bodyArea, node); + log.error("Context cannot be null"); + else + uiProvider.createUi(bodyArea, node); } catch (RepositoryException e) { throw new CmsException("Cannot refresh body", e); }