Reply To: Yet another I18N approach

Splash Forums PrettyFaces Users Yet another I18N approach Reply To: Yet another I18N approach

#26191

zozan
Participant

How do I bind {lang} to locale.setLanguage(String lang) method? This failed

.addRule()
             .when(Path.matches("/{lang}/{path}").withRequestBinding())
             .perform(Forward.to("/{path}.xhtml"))      
             .where("path").configuredBy(LocaleTransposition.bundle("bundles.text", "lang")) 
             .where("lang").bindsTo(PhaseBinding.to(El.property(localeBean.language)))

And what about failing of the following join rule because of ui:composition?

.addRule(Join.path("/{lang}/{path}").to("/{path}.xhtml"))
             .where("path").configuredBy(LocaleTransposition.bundle("bundles.text", "lang"))

And if I have to not use join because of this NPE how do I write an outbound rule so that h:link tags work?

  • This reply was modified 7 years, 8 months ago by  zozan.