Re: Pretty faces don`t work for me

Splash Forums PrettyFaces Users Pretty faces don`t work for me Re: Pretty faces don`t work for me


You are mixing up JSF action methods and page actions. Page actions are executed each time you access an URL. So your methods gets executed, you return a PrettyFaces navigation outcome, which will redirect you to the same page again, which will call the page action again, which redirect, and so on…

Just remove the URLAction annotation from your method and change the button to:

<h:commandButton action="#{loginAction.action}" styleClass="ok" value="Login" />

That should do the trick.

But I really recommend that you have a deeper look at the documentation and the example application I posted earlier so that you can get a deeper understanding on the general patterns to apply if you are using PrettyFaces.