Hi,
Custom validation on an entity can be implemented in the ValidationEvent
listener of the Edit screen, e.g.:
@Subscribe
public void onValidation(final ValidationEvent event) {
if (!checkNameFormat()) {
ValidationErrors errors = new ValidationErrors();
errors.add(nameField, "Invalid name format");
event.addErrors(errors);
}
}
If I got you right, you need to test if an entity matches LogicalCondition
from browse screen. In this case you need to pass LogicalCondition
from browse screen to editor screen when opening it. Passing parameters to screen doc should help you with that.
The only problem here is to apply Condition
to an entity. We don’t have API to do this, because conditions are applied to jpql queries. So, it’s all up to you.
Regards,
Gleb