How configuring the default page after the User Connexion?
I would like to choose the page displayed after the User is connected.
How I do that?
After, connexion Nuxeo call this method StartupHelper#initDomainAndFindStartupPage. This method initialize the CoreSession on the Nuxeo Core and initialize the Seam Context (Used to create the view).
You can override this method to initialize the context according your need for that you need first override the startupHelper Seam Component. As we extract the repository initialization into a method you can only override this method.
For that create through Nuxeo IDE or by hand the Seam Component and set a higher precedence:
@Name("startupHelper")
@Scope(SESSION)
@Install(precedence = Install.APPLICATION)
public class MyStartupHelper extends StartupHelper {
@Override
public String initServerAndFindStartupPage() throws ClientException {
super.initServerAndFindStartupPage();
... do your stuff to find the document on which you want to navigate ...
return navigationContext.setCurrentDocument(doc);
or
return navigationContext.setCurrentDocument(doc, viewId);
}
}
I'm not sure if Seam Annotations are transmit to inherit classes. If not, you have to also override this method like that:
@Override
@Begin(id = "#{conversationIdGenerator.nextMainConversationId}", join = true)
public String initDomainAndFindStartupPage(String domainTitle, String viewId) {
super.initDomainAndFindStartupPage(domainTitle, viewId);
}
Hope this help…