Reply To: What happened to PrettyFaces?

Splash Forums PrettyFaces Users What happened to PrettyFaces? Reply To: What happened to PrettyFaces?

#24182

If you are using @URLMappings just as a store of very very simple pages without any (or much) functionality, you should use a ConfigurationProvider instead. You will get the type-safety of the Java configuration style and have all the configuration in one place. You can also use constants and stuff like that.

For the programmatic navigation: If you want to build an URL, you could use the AddressBuilder. This class provides a fluent API for building URLs.


String url = AddressBuilder.begin()
    .path("/passrecovery/{lang}/{token}/")
    .set("lang", "en")
    .set("token", "29b4033ca6f93ae78495108b629f3ec3fda055a0")
    .toString();

See also the tests here:

https://github.com/ocpsoft/rewrite/blob/master/addressbuilder/src/test/java/org/ocpsoft/urlbuilder/AddressBuilderTest.java