Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.4
-
None
Description
extval doesn't support the validateBean tag to keep the type-safety of bv-groups (instead @BeanValidation is provided). however, also the tag isn't what users need when it comes to group validation in several cases. with the tag it's just possible to specify groups for input components or disable bv with the disabled attribute.
a lot of cases just require different actions within a form which should process the whole form in a different manner (= different or no bv-group/s). furthermore, there are several use-cases which require to bypass the validation process e.g. via a special group which isn't used for bv-constraints (see EXTVAL-142). in such cases the usage of the immediate attribute doesn't fit and the usage of the disabled attribute is more like a workaround.
extval already provides @BeanValidation to 'useGroups' and 'restrictGroups' (optionally for specific views via 'viewIds' and/or specific conditions via 'conditions'). this feature allows to re-use this annotation also for action methods. so it's possible to use it for the scenarios mentioned above as well as EXTVAL-142.
a simple example:
@BeanValidation(useGroups = MyGroup.class)
public String send()
{
//...
return "success";
}
a button which is bound to this action method will remove all configured groups of the current form for the current request, add the groups listed in 'useGroups' and locks the internal context until the invoke application phase to avoid that further groups get added.
we can also think about just adding the groups and use 'restrictGroups' to remove the groups which shouldn't be used. and only SkipValidation of EXTVAL-141 would trigger the behaviour described before.
Attachments
Issue Links
- is depended upon by
-
EXTVAL-142 SkipValidation group to skip the validation process via an action-method
- Closed
- relates to
-
EXTVAL-152 configuration for deactivating group validation triggered via action-methods
- Closed