We're using JSF 2.0 in our web layer, and we'd like to have a fine control over the UI components that need to be rendered and required.
Rather than applying "rendered" and "required" attributes on every component, we'd like to delegate such configurations to a centralized component.
There are several dimension to be considered on this configuration, such as the user logged in, the page being displayed, and some business contexts, i.e:
(page x, txtfield y, user A, business context w) -> ( rendererd = true, required = false)
(page x, txtfield y, user B, business context w) -> ( rendererd = true, required = true, error msg = ...)
(page x, txtfield y, user B, business context t) -> ( rendererd = false, required = false)
Is there some proven solution (a framework, maybe) to handle this requirement ?
Are there best practices to consider using JSF 2.0 API to handle this requirement ?
Regards,
Rod