10-27-2011 01:07 PM
I would like to choose the page displayed after the User is connected.
How I do that?
10-27-2011 01:35 PM
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...
10-27-2011 01:35 PM
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...
05-08-2013 07:46 AM
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
05-13-2013 03:09 PM
Yes, thanks, fixed.
09-17-2016 03:38 PM
Hello. For the new nuxeo timeoff plugin, what would be the best method to redirect the user to .../nuxeo/timeoff url after login ?
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.