I have a requirement to validate an JSF/ADF input field only if the value of that field changed by users. If the value on the page is the same as the value in the model, skip validation for that field.
I am using JSF and Oracle ADF Faces, I know JSF life cycle and I can make my own converter or validator, but I can't find the old value anywhere.
During validation the old value should be available by UIInput#getValue()
.
public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException {
Object oldValue = ((UIInput) component).getValue();
// ...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With