Reply To: JSF page navigation help

Splash Forums PrettyFaces Users JSF page navigation help Reply To: JSF page navigation help

#25214

So you say the JSF view depends on the accessed URL and there is no naming pattern but you get this information only from the database? In this case it would perhaps make sense to build the configuration completely from the database. You could access the database from your configuration provider and then iterate over all your database entries and dynamically add multiple concrete joins like this:

.addRule( Join.path("/com/aboutus.html").to("/faces/pages.xhtml") )
.addRule( Join.path("/com/general.html").to("/faces/general.xhtml") )

There is also a DomainName condition in Rewrite. So you can restrict rewriting rules to domain names. Something like this:

.addRule( Join.path("/com/aboutus.html").to("/faces/pages.xhtml") )
.when(Domain.matches("www.example.com"))