As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
Bonjour, je souhaites que lorsqu'un utilisateur se connecte, il arrive sur sa page HOME, j'ai bien vu cette doc : http://doc.nuxeo.com/display/KB/Changing+the+welcome+page+of+Nuxeo+DM mais comment la mettre en place quand on utilise studio ? Merci d'avance
Bonjour,
Tu es obligé de passer par la partie IDE et de faire ton propre Listener qui va rediriger automatiquement l'utilisateur sur l'URL voulu.
J'avais fait ça pour rediriger l'utilisateur sur son propre UserWorkspace :
@Name("startupHelper") @Scope(ScopeType.SESSION) @Install(precedence = Install.APPLICATION) public class LoginRedirectionActionBean extends StartupHelper implements Serializable { private static final long serialVersionUID = 1L; private static final Log log = LogFactory.getLog(LoginRedirectionActionBean.class); @In(create = true, required = false) protected transient CoreSession documentManager; @In(create = true) protected NavigationContext navigationContext; @In(create = true, required = false) protected transient FacesMessages facesMessages; @In(create = true, required = false) protected NuxeoPrincipal currentNuxeoPrincipal; @In(create = true) protected DocumentsListsManager documentsListsManager; private PathRef redirectUrl; @Override public String initServerAndFindStartupPage() throws ClientException { final String view = super.initServerAndFindStartupPage(); String userName = currentNuxeoPrincipal.getName(); userName = userName.replace("_", "-"); if (documentManager == null) { documentManager = navigationContext.getOrCreateDocumentManager(); } redirectUrl = new PathRef("default-domain/UserWorkspaces/" + userName); try { if (documentManager.exists(redirectUrl)) { return navigationContext.navigateToRef(redirectUrl); } } catch (final ClientException e) { log.warn("error getting doc"); } return view; } @Override public String initDomainAndFindStartupPage(String domainTitle, String viewId) { final String view = super.initDomainAndFindStartupPage(domainTitle, viewId); if (redirectUrl == null) { return view; } try { return navigationContext.navigateToRef(redirectUrl); } catch (final ClientException exception) { return view; } } }
Ok, donc dans un projet Eclipse, je dois ajouter un "Document Model/Document Listener" ?
Oui un document Model Listener puis tu remplaceras les valeurs des annotations par celle ci dessus.