Overview
Other MyFaces Extensions
- CODI
- Ext-Script
- [Orchestra]
- [Portlet Bridge]
...
Besides the examples which are shipped with ExtVal r3+ itself there are some examples out there.
E.g. there is a sample application which shows JSF 1.2 + PrimeFaces + MyFaces ExtVal in action.
...
As alternative there is an add-on for Spring 3 and the BV integration (= ExtVal validation module) to allow typesafe dependency injection in constraint validators.
The concept is similar to @JoinValidation (provided by the property-validation module. However, this version is more type-save and it is supported by the property- as well as the bean-validation module.
Since both modules support the same syntax you will find further information here.
The std. integration of BV in JSF 2.0 doesn't allow to continue the validation within CustomType
. So ExtVal offers an additional feature which allows using @javax.validation.Valid
for custom types.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
public class CustomType
{
@NotNull
private String property1;
@Size(min = 3)
private String property2;
//+ getter-/setter-methods
}
public class CustomBean
{
@NotNull
@Valid
private CustomType property;
//+ getter-/setter-methods
}
|
If you are providing a custom converter, you can access the property via customBean.property
and all constraints (including the constraints within CustomType
) will be validated.