- boolean login(Display d) {// , IEclipseContext eclipseContext) {
- // RepositoryFactory repositoryFactory =
- // eclipseContext.get(RepositoryFactory.class);
- // Map<String, String> params = new HashMap<>();
- // params.put("cn", "home");
- // Repository homeRepository;
- // try {
- // homeRepository = repositoryFactory.getRepository(params);
- // } catch (RepositoryException e1) {
- // throw new CmsException("Cannot get home repository", e1);
- // }
- // eclipseContext.set("(cn=home)", homeRepository);
+ boolean login(final IEventBroker eventBroker) {
+ browserNavigation = RWT.getClient().getService(BrowserNavigation.class);
+ if (browserNavigation != null)
+ browserNavigation.addBrowserNavigationListener(new BrowserNavigationListener() {
+ private static final long serialVersionUID = -3668136623771902865L;
+
+ @Override
+ public void navigated(BrowserNavigationEvent event) {
+ state = event.getState();
+ if (uxContext != null)// is logged in
+ stateChanged();
+ }
+ });