Uploaded image for project: 'MyFaces Extensions Validator'
  1. MyFaces Extensions Validator
  2. EXTVAL-59

Static referencing for @JoinValidation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.2.3, 2.0.3, 1.1.3
    • 1.2.3, 2.0.3, 1.1.3
    • Core, Property Validation
    • None

    Description

      Currently, three options exist to refer to another property to inherit the validation from:

      • local property (e.g. @JoinValidation("lastName")
      • property chain (e.g. @JoinValidation("person.lastName")
      • Expression Language (EL) (e.g. @JoinValidation("# {personBean.lastName}

        ")

      Consider the following situation: we have a Manager class that only has a List of Person objects. Suppose the Manager has a lastName property and we want that property to inherit the validation of the lastName property from the Person class. We cannot property chain in this case. EL might be possible, but only if we know there is a Person object we can use for that in the View layer. Even if this is going to work, it isn't good, because we have to have detailed knowledge of our View layer within our Model, something we don't want.

      It would be nice if we could just write: @JoinValidation("com.pany.package.Person.lastName"). In this case we sort of statically refer to the Person class by its fully classified name.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bkummel Bart Kummel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: