Web UI Framework

How to Customize Startup Redirection

After connection, the startup page is defined by the method StartupHelper.initDomainAndFindStartupPage. If you want to customize the startup redirection, you have to override the method initDomainAndFindStartupPage in a custom class.

The following example presents a customization redirecting every user to the dashboard except for the Administrators :

@Name("startupHelper")
@Scope(SESSION)
public class CustomStartupHelper extends StartupHelper {

    private static final long serialVersionUID = 1L;

    @Override
    @Begin(id = "#{conversationIdGenerator.nextMainConversationId}", join = true)
    public String initDomainAndFindStartupPage(String domainTitle, String viewId) {
        String result = super.initDomainAndFindStartupPage(domainTitle, viewId);
        if (((NuxeoPrincipal) documentManager.getPrincipal()).isAdministrator()) {
            return result;
        } else {
            return dashboardNavigationHelper.navigateToDashboard();
        }
    }
}

The method initDomainAndFindStartupPage must return an existing view id. For example, the following view id can be used to customize the redirection :

  • view_servers to access the list of available servers
  • view_home to access the dashboard of the current user
  • view_domains to access the list of domains
  • search to access the search page

 

17 days ago Andrew Goodricke Syntax error fixed
4 years ago Gildas Lefevre 6
5 years ago Solen Guitter 5
5 years ago Gildas Lefevre 4
5 years ago Gildas Lefevre 3
5 years ago Gildas Lefevre 2
5 years ago Gildas Lefevre 1
History: Created by Gildas Lefevre

We'd love to hear your thoughts!

All fields required