Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Property Validation
    • Labels:
      None

      Description

      It would be useful to define a condition as an EL expression.
      Something like:

      @ValidWhen("property * 5 = 55")

        Activity

        Hide
        Gerhard Petracek added a comment -

        it is planned to introduce @Expression as well as pluggable expression interpreters in r5.
        we could use these mechanisms also for this feature. -> let's wait for r5.

        you can use the implementation of the patch in a custom validation module (in this case you just have to ignore CommonMetaDataKeys or introduce e.g. CustomCommonMetaDataKeys).
        current syntax:
        @Valid(when = "value eq ...", validationErrorMsgKey = "invalid - expression:

        {0}

        ")
        or
        @Valid(when = "#

        {value eq ...}

        ", validationErrorMsgKey = "...")

        syntax with @Expression:
        @Valid(when = @Expression("value eq ..."), validationErrorMsgKey = "...")

        Show
        Gerhard Petracek added a comment - it is planned to introduce @Expression as well as pluggable expression interpreters in r5. we could use these mechanisms also for this feature. -> let's wait for r5. you can use the implementation of the patch in a custom validation module (in this case you just have to ignore CommonMetaDataKeys or introduce e.g. CustomCommonMetaDataKeys). current syntax: @Valid(when = "value eq ...", validationErrorMsgKey = "invalid - expression: {0} ") or @Valid(when = "# {value eq ...} ", validationErrorMsgKey = "...") syntax with @Expression: @Valid(when = @Expression("value eq ..."), validationErrorMsgKey = "...")
        Hide
        Rudy De Busscher added a comment -

        These kind of checks can be achieved by using the reference resolver add-on. See http://jsfcorner.blogspot.com/2011/10/announce-reference-resolver-add-on-for.html

        Show
        Rudy De Busscher added a comment - These kind of checks can be achieved by using the reference resolver add-on. See http://jsfcorner.blogspot.com/2011/10/announce-reference-resolver-add-on-for.html

          People

          • Assignee:
            Unassigned
            Reporter:
            Walter Mourão
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development