This issue is for tracking discussion related to Requirement #8: Conditional
Constraints (see the requirements-elicitation.html document for a description
of this requirement).
Mike Aizatsky wrote:
Aren't tasks like these easier to handle in java code than in
declarative XML mini-language? Particulary, #8 is really easy
performed with the help of DesignInfo from JSR-273. Any custom-based
language will have serious limitations as for constraints support.
Jeffrey Stephenson wrote:
Yeah, I happen to agree with you on this one. In the tool that I work
on, JDeveloper, we define a ValidatorCallback interface, that can be
associated with a JSF component via a tool-specific metadata item.
When validating a JSF page, we call into the ValidatorCallback instances
passing them the current context and the log to put errors/warnings into,
so that component vendors can perform additional validation of the kind
found in the use cases for #8. I imagine something very similar can be
standardized in JSR 273.
However, if anyone has any ideas on how to express these constraints
declaratively, it is certainly worth discussing further.