htmlClass =(String)htmlClassBinding.getObject(String.class) + " "+htmlClassToAdd;
} else {
getLog().debug(activity.getFullActivityInstanceNamespace()+ ": cannot add class to component="+formComponent);
}
if (htmlClass != null) {
formComponent.setBinding(HTML_CLASS, new LiteralBinding("html class", valueConverter, location, htmlClass));
}
if (htmlOnBlurBinding == null) {
String htmlOnBlurValue = "javascript:amplafi.util.refreshIfChanged(this);";
formComponent.setBinding(HTML_ONBLUR, new LiteralBinding("html on blur", valueConverter, location, htmlOnBlurValue));
} else {
getLog().debug(activity.getFullActivityInstanceNamespace()+ ": cannot add onblur to component="+formComponent);
}
}
if (validatorsBinding == null) {
String validators = definition.getValidators();
if ( definition.getPropertyRequired() == FlowActivityPhase.advance) {
if ( isBlank(validators)) {
validators = REQUIRED;
} else {
// may re-add required if already present - seems like a minor issue
validators = REQUIRED + "," + validators;
}
}
if (isNotBlank(validators)) {
validatorsBinding = this.validationBindingFactory.createBinding(formComponent, "", validators, null);
formComponent.setBinding(VALIDATORS, validatorsBinding);
}
} else if ( getLog().isDebugEnabled()){
getLog().debug(activity.getFullActivityInstanceNamespace()+": property binding "+this+": make sure that @Parameter(cache=false) is set because first access is not by a ValidatableField component");
}
}
// avoid constantly re-adding the bindings
// HACK: this however results in adding the attribute to all html nodes using a FlowPropertyBinding.
formComponent.setBinding(ALREADY_ADDED_BINDING, new LiteralBinding(ALREADY_ADDED_BINDING, valueConverter, location, "true"));
}
}
}