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?

1 votes

2 answers



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:

@Install(precedence = Install.APPLICATION)
public class MyStartupHelper extends StartupHelper {

    public String initServerAndFindStartupPage() throws ClientException {

      ... do your stuff to find the document on which you want to navigate ...
      return navigationContext.setCurrentDocument(doc);
      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:

@Begin(id = "#{conversationIdGenerator.nextMainConversationId}", join = true)
public String initDomainAndFindStartupPage(String domainTitle, String viewId) {
  super.initDomainAndFindStartupPage(domainTitle, viewId);

Hope this help…

2 votes

Hello, I think the @override annotation does not stand at its right place does it ? should be mentionned at the initServerAndFindStartupPage() level, not at class level, thanks by the way

Yes, thanks, fixed.

Hello. For the new nuxeo timeoff plugin, what would be the best method to redirect the user to …/nuxeo/timeoff url after login ?

0 votes