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

#23285

The code from your last post looks much better. Page actions (@URLAction) are typically only used to prepare the page by loading all the data that is required to display correctly from the database or any other place. If you want to submit forms, you should use action methods like with plain JSF (like you do it now).

From your action method you should return a PrettyFaces navigation string if the login was successful. In this case the user will be redirect to the new page. Something like this:

if(loginSuccess) {
// redirect the user to the new page
return "pretty:someOtherMappingId";
}
else {
// render current page again
return null;
}