In JSF is it ok to bind UI components to backing bean just to render messages or we should only bind when we need to do lot more than just rendering messages?

  • It depends on what you are binding to! Is it a DTO that represents the message or something else? Nov 1, 2012 at 12:54
  • In the current application, it is mainly used to bind error messages to the component, other than that there is nothing happening with the UI object. So i'm asking is it an over kill to bind each component just for that purpose?
    – user71561
    Nov 2, 2012 at 6:18
  • 1
    Probably yes - having it bind to one generic error message component with different contents should do the trick Nov 2, 2012 at 15:39

1 Answer 1


Backing beans are for your data, not for messages, so I would go for another aproach: Use the built-in i18n-features instead. I think that's the proper place for all your static strings, which are presented to the user. Plus your Application is ready to be translated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.