dennis hoersch created MFCOMMONS-47:
---------------------------------------
Summary: CompareToValidator: Use label instead of Id for
validation message
Key: MFCOMMONS-47
URL: https://issues.apache.org/jira/browse/MFCOMMONS-47
Project: MyFaces Commons
Issue Type: Improvement
Components: myfaces-commons-validators
Affects Versions: 1.0.2.1
Environment: MyFaces 2.1.6, Tomahawk20 1.1.11
Reporter: dennis hoersch
The (Abstract-)CompareToValidator uses the Id as placeholder in the validation
error message. In other validation messages (i.e. required) there is the label
used as default and the id as fallback.
It would be nice to not have the technical identifier in the error message.
Could be done with the following snippet (AbstractCompareToValidator, at around
line 350):
Object[] args =
{
MessageUtils.getLabel(facesContext, uiComponent),
value.toString(),
(alternateOperatorName == null) ? nameForOperator(operator) :
alternateOperatorName,
foreignComponent.getId(),
foreignValue.toString()
};
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira