Showing posts with label cross-validation. Show all posts
Showing posts with label cross-validation. Show all posts

Thursday, November 26, 2009

primefaces and jsr 303 via extval

the previous post shows how easy it is to set-up extval to be used with primefaces.

in the meantime i created a small example [1] which shows that it is very easy to use jsr 303 constraints in a primefaces application via extval.

furthermore, the demo shows ajax validation based on jpa annotations as well as cross-validation via ajax and the none-blocking warn mode.

moreover, the example shows the optional component support module for primefaces. for example it allows component initialization of the password-component based on meta-data. that's equivalent to the functionally available for the standard components. if a property bound to this special primefaces component hosts meta-data about min and max length (e.g. the jsr 303 constraint @Size(min = 7, max = 14), these information get transferred to the component automatically.

a sample screen of the demo:



[1] http://code.google.com/p/sandbox890/source/browse/#svn/trunk/examples/primefaces_extval/example_01

Sunday, November 15, 2009

myfaces extval 2 and icefaces 2

today i had a quick look at the first version of icefaces 2. it looks really nice. so i added extval to the component demo project.

i tested simple constraints as well as cross-validation (cross-component-validation/inter component validation). both worked quite nice also with ajax enabled input components.

also new extval features like severity aware validation (e.g. non-blocking warn mode) work quite well.

i'm looking forward to seeing the final version!

the upgrade of the demo (with extval) was done quite fast:
just adding the jar files and using the constraints!

in this case i used the following maven dependencies for extval:

groupId: org.apache.myfaces.extensions.validator
artifactId: myfaces-extval-core
version: 2.0.3-SNAPSHOT

groupId: org.apache.myfaces.extensions.validator.validation-modules
artifactId: myfaces-extval-property-validation
version: 2.0.3-SNAPSHOT

currently we also need (we will see if we need it with the final version as well)
groupId: org.apache.myfaces.extensions.validator.component-support-modules
artifactId: myfaces-extval-generic-support
version: 2.0.3-SNAPSHOT

for sure also the myfaces extval support for jsr 303 works out-of-the-box after adding the needed jar files...

Thursday, November 12, 2009

bean-validation support for richfaces via extval

today i upgraded an internal richfaces 3.3.x demo to use extval to integrate jsr 303 validation.

the upgrade was done quite fast:
just adding the jar files and using the bv constraints!

in this case i used the following maven dependencies:

for richfaces:
groupId: org.richfaces.ui
artifactId: richfaces-ui
version: 3.3.2.GA

for extval:
groupId: org.apache.myfaces.extensions.validator
artifactId: myfaces-extval-core
version: 1.2.3-SNAPSHOT

required to use a4j with extval:
groupId: org.apache.myfaces.extensions.validator.component-support-modules
artifactId: myfaces-extval-generic-support
version: 1.2.3-SNAPSHOT

to use jsr 303 validation:
groupId: org.apache.myfaces.extensions.validator.validation-modules
artifactId: myfaces-extval-bean-validation
version: 1.2.3-SNAPSHOT

groupId: org.hibernate
artifactId: hibernate-validator
version: 4.0.0.GA

groupId: org.slf4j
artifactId: slf4j-api
version: 1.4.2

groupId:org.slf4j
artifactId: slf4j-log4j12
version: 1.4.2

to support org.richfaces.component.html.HtmlCalendar
groupId: sandbox890.extensions.validator.component-support-modules
artifactId: myfaces-extval-richfaces-support
from http://code.google.com/p/sandbox890/