Re: Server action and redirection

Splash Forums PrettyFaces Users Server action and redirection Re: Server action and redirection

#21419

Just a small note on the second approach:

Yes, you are understanding it correctly. The typical way of doing navigation with this approach is to get a reference to the bean “responsible” for the second page and setting the corresponding properties. If you then return pretty:someId from the action method, PrettyFaces will know which mapping you want to redirect to. PrettyFaces will then read the path parameter values from the second bean and build the correct URL.

You are 100% correct if you say that this creates a dependency between the two page beans. But I for myself prefer this way over the first one because it is more type-safe! And I don’t have to build URL using string concatenation. But that’s just my personal opinion on this! :)