Internationalization (i18n) using JSF Facelets: Messages in Java-classes
问题 I have successfully implemented i18n in my project. Now I'm stuck in my Bean... private String pageTitle; public List<Product> getProductsByCategory(String category) { if(validate(category)) { pageTitle = category; return service.getProductsByCategory(String category); } else { pageTitle = "Random products"; return service.getRandomProducts(); } } As you can see, I would like to let my pageTitle depend on the result of the provided method. All fine, but this is not fine considering