Redirect after login

Hello,

Is't possible to redirect user in worspaces after login using only nuxeo studio ?

Thank you, Abdoul

0 votes

1 answers

2898 views

ANSWER



Hi Abdoul,

you can follow the instructions in this answer but your class should look like this :


@Name("startupHelper")
@Scope(SESSION)
@Install(precedence=Install.DEPLOYMENT)
public class MyStartupHelper extends StartupHelper {

    public String initDomainAndFindStartupPage(String domainTitle, String viewId) {
        String view = super.initDomainAndFindStartupPage(domainTitle, viewId);
        PathRef ref = new PathRef("/default-domain/workspaces/Workspace 1");
        try {
            if (documentManager.exists(ref)) {
                view =  navigationContext.navigateToRef(ref);
            }
        } catch (ClientException e) {
            // TODO
        }
        return view;
    }
}

I hope it helps.

1 votes



And make sure you have an empty file named 'seam.properties' in src/main/resource of your project.
06/17/2013