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?
Asked
Active
Viewed 1,941 times
3
-
It depends on what you are binding to! Is it a DTO that represents the message or something else? – Martijn Verburg Nov 01 '12 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 02 '12 at 06:18
-
1Probably yes - having it bind to one generic error message component with different contents should do the trick – Martijn Verburg Nov 02 '12 at 15:39
1 Answers
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.

Regular John
- 409
- 2
- 7