|
While not explicitly stated, the algorithm for message interpolation also covers the case of nesting message parameters within EL expressions, which allows for use cases which refer to messages from the resource parameters or constraint attributes (which are resolved via parameter interpolation) which then are used within EL expressions. The following gives an example:
@ThresholdMax(
value=10,
messageThreshold=50,
message="${validatedValue > {messageThreshold} ? '{muchTooLarge.message}' : '{aBitTooLarge.message}'}")
int myInt = ...;
This case should be resolved by the algorithm as follows:
To clarify that such nesting is considered legal, an example as this should be added to the spec and a test to the TCK.
|