peter_pilgrim
peter_pilgrim

Reputation: 1160

Navigate flow from another managed bean

JSF 2.2 and Java EE 7

Let's say you have a Faces Flow called "/simple". It is already set and running.

Now you have another backing bean called DonkeyController.

@ViewScoped
public class DonkeyController {
    /* ... */
    public String doWork() {
        return "/simple";
    }
    public String doWorkRedirect() {
        return "/simple?faces-redirect=true";
    }
}

This does not appear to work. How can you navigate (dynamically) to the start page of a Faces Flow from another backing bean?

Upvotes: -1

Views: 172

Answers (1)

peter_pilgrim
peter_pilgrim

Reputation: 1160

The answer is removed the leading slash. JSF 2.2 triggers just by the name of the Faces Flow. For my case "simple"

Upvotes: 0

Related Questions