Uploaded image for project: 'MyFaces Commons'
  1. MyFaces Commons
  2. MFCOMMONS-47

CompareToValidator: Use label instead of Id for validation message

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.0.2.1
    • None
    • None
    • MyFaces 2.1.6, Tomahawk20 1.1.11

    Description

      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() }

      ;

      Attachments

        Activity

          People

            Unassigned Unassigned
            hoersch dennis hoersch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: