X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=swt%2Frap%2Forg.argeo.cms.e4.rap%2Fsrc%2Forg%2Fargeo%2Fcms%2Fe4%2Frap%2FCmsLoginLifecycle.java;h=cdd87fd3f54696688270d7751349efbe1b761b96;hb=0e533d2562def311fdd7aa71f1d0d704e466861e;hp=cda9a117f681f0f091590b87ece870517cb96de4;hpb=a81a19a9a3e45a89ed3b7c783bd5747cc27f6aa1;p=lgpl%2Fargeo-commons.git diff --git a/swt/rap/org.argeo.cms.e4.rap/src/org/argeo/cms/e4/rap/CmsLoginLifecycle.java b/swt/rap/org.argeo.cms.e4.rap/src/org/argeo/cms/e4/rap/CmsLoginLifecycle.java index cda9a117f..cdd87fd3f 100644 --- a/swt/rap/org.argeo.cms.e4.rap/src/org/argeo/cms/e4/rap/CmsLoginLifecycle.java +++ b/swt/rap/org.argeo.cms.e4.rap/src/org/argeo/cms/e4/rap/CmsLoginLifecycle.java @@ -4,16 +4,18 @@ import java.security.AccessController; import java.util.UUID; import java.util.concurrent.Callable; +import javax.inject.Inject; import javax.security.auth.Subject; import javax.security.auth.login.LoginContext; import javax.security.auth.login.LoginException; import org.argeo.api.cms.CmsAuth; +import org.argeo.api.cms.CmsContext; import org.argeo.api.cms.CmsLog; import org.argeo.api.cms.ux.CmsImageManager; import org.argeo.api.cms.ux.CmsView; import org.argeo.api.cms.ux.UxContext; -import org.argeo.cms.auth.CurrentUser; +import org.argeo.cms.CurrentUser; import org.argeo.cms.swt.CmsSwtUtils; import org.argeo.cms.swt.SimpleSwtUxContext; import org.argeo.cms.swt.acr.AcrSwtImageManager; @@ -35,6 +37,9 @@ import org.osgi.service.event.EventHandler; public class CmsLoginLifecycle implements CmsView { private final static CmsLog log = CmsLog.getLog(CmsLoginLifecycle.class); + @Inject + private CmsContext cmsContext; + private UxContext uxContext; private CmsImageManager imageManager; @@ -63,8 +68,7 @@ public class CmsLoginLifecycle implements CmsView { Subject subject = Subject.getSubject(AccessController.getContext()); Display display = Display.getCurrent(); // UiContext.setData(CmsView.KEY, this); - // FIXME get CMS context - CmsLoginShell loginShell = new CmsLoginShell(this, null); + CmsLoginShell loginShell = new CmsLoginShell(this, cmsContext); CmsSwtUtils.registerCmsView(loginShell.getShell(), this); loginShell.setSubject(subject); try { @@ -142,7 +146,7 @@ public class CmsLoginLifecycle implements CmsView { public void exception(Throwable e) { String msg = "Unexpected exception in Eclipse 4 RAP"; log.error(msg, e); - CmsFeedback.show(msg, e); + CmsFeedback.error(msg, e); } @Override