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:
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
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:
- 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)
- When a dependentField changes, but not the field where this validator is defined, this validator is run nevertheless.
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
Comment