Hi,
I am validating a field(user presses validation button) and if its invalid I
highlight the field in the following way:
AjaxSubmitLink checkName = new AjaxSubmitLink("check_name", form) {
public void onSubmit(AjaxRequestTarget target, Form<?> form) {
if (name.length() < 5) {
name.add(new SimpleAttributeModifier( "style",
"color:red;border-color:red;"));
target.addComponent(domain_name);
}
}
}
Then when the user modifies the name field, I need to remove the red color
from the field.
Is it better to do it with behaviour and look for onchange event? If yes,
which one?
Thank you
Anna