Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • Isomorphic
    replied
    Behavior is as doc'd, it allows you to have a validator run when there has been a change in another field.

    If you think it's not working as doc'd, please show how to reproduce the issue.

    Leave a comment:


  • 12.0p Validator.dependentFields unclear docs and effect

    Hi Isomorphic,

    the docs for Validator.dependentFields are pretty unclear on the effect of the attribute.
    Here I assumed that it might be a more declarative way to validate dependent fields, if only one field changes. But after testing it, this seems not to be true.
    As the docs are unclear to me, could you please explain what it actually does? I had two assumptions:
    1. When using a serverCustom validator, these fields are always sent with the validate or update request, so that they are available in
      Code:
      public boolean condition(Object value, Validator validator, String fieldName, @SuppressWarnings("rawtypes") Map record, DataSource ds,
      	            HttpServletRequest httpServletRequest)
    2. When a dependentField changes, but not the field where this validator is defined, this validator is run nevertheless.
    Both assumptions seem to be wrong.

    I want to make my configuration GUI a bit more bulletproof for misconfigurations and this would greatly benefit from such a feature and/or applyWhen (which seems to be working IMHO).
    I'm using latest 12.0p here.

    Best regards
    Blama
Working...
X