• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

MyFaces Extensions Validator r4 news

on

  • 4,399 views

These slides give a short overview of the new features of the 4th release of MyFaces ExtVal

These slides give a short overview of the new features of the 4th release of MyFaces ExtVal

Statistics

Views

Total Views
4,399
Views on SlideShare
2,151
Embed Views
2,248

Actions

Likes
0
Downloads
0
Comments
0

36 Embeds 2,248

http://os890.blogspot.com 1113
http://os890.blogspot.co.at 373
http://os890.blogspot.de 309
http://os890.blogspot.com.br 69
http://os890.blogspot.nl 43
http://os890.blogspot.fr 39
http://os890.blogspot.se 33
http://os890.blogspot.ca 31
http://os890.blogspot.no 26
http://os890.blogspot.in 24
http://os890.blogspot.ch 21
http://os890.blogspot.mx 20
http://os890.blogspot.com.es 16
http://os890.blogspot.it 16
http://os890.blogspot.cz 16
http://os890.blogspot.co.uk 14
http://os890.blogspot.jp 14
http://os890.blogspot.ru 10
http://os890.blogspot.com.au 9
http://os890.blogspot.hk 7
http://os890.blogspot.be 7
http://os890.blogspot.dk 7
http://os890.blogspot.com.tr 4
http://os890.blogspot.ie 3
http://os890.blogspot.fi 3
http://os890.blogspot.kr 3
http://os890.blogspot.co.il 2
http://os890.blogspot.hu 2
http://os890.blogspot.co.nz 2
http://os890.blogspot.pt 2
http://os890.blogspot.gr 2
http://translate.googleusercontent.com 2
http://os890.blogspot.sk 2
http://os890.blogspot.ae 2
http://os890.blogspot.tw 1
http://os890.blogspot.com.ar 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    MyFaces Extensions Validator r4 news MyFaces Extensions Validator r4 news Presentation Transcript

    • JSF in der Praxis28.11.2010 DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 1
    • MyFaces Extensions-Validator What’s new in version 428.11.2010 DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 2
    • Agenda• Mapped Constraint Sources• Performance Improvements• New and Improved Constraints• Type-safe Config (Java-Config)• Support for @Valid• Interoperability• Misc28.11.2010 DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 3
    • Mapped Constraint Sources - 1• The problem • Multiple classes might contain the same properties (e.g. DTOs, PageBeans,…) • Some architectures don’t allow e.g. to share the domain model across layers • That violates the DRY principle for constraints• The solution • Annotations for referencing the source of a constraint • Works for ExtVal as well as BV constraints28.11.2010 DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 4
    • Mapped Constraint Sources - 2• Simple Example @ConstraintSource(User.class) public class UserDTO { //mapped automatically to User#firstName private String firstName; //mapped automatically to User#lastName private String lastName; //... }28.11.2010 DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 5
    • Mapped Constraint Sources - 2• Further annotations for properties • @ConstraintSource • @TargetProperty • @TargetPropertyId • @IgnoreConstraintSource• These annotations allow to • map to a property with a different name (same source) • map to a different constraint source • ignore the constraint source for a property28.11.2010 DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 6
    • Performance Improvements28.11.2010 DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 7
    • New and Improved Constraints• New Constraints • @EmptyIf• Improved • @Equals and @NotEquals • Configurable message-target (#validationErrorMsgTarget) • Optional case-insensitive text comparisons (via Constraint-Parameter: CaseInsensitive)28.11.2010 DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 8
    • @EmptyIf Constraint - 1• Example 1 public class MyBean { private String property1; //has to be empty if property1 is not empty @EmptyIf(valueOf = "property1") private String property2; //... }28.11.2010 DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 9
    • @EmptyIf Constraint - 2• Example 2 public class MyBean { private String property1; //has to be empty if property1 is empty @EmptyIf(valueOf = "property1", is = empty) private String property2; //... }28.11.2010 DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 10
    • Type-safe Config - 1• Instead of conversations or configuration via web.xml ExtVal now allows to use a simple Java-API within Startup-Listeners28.11.2010 DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 11
    • Type-safe Config - 2• Example Extend the default or abstract implementations of a config (e.g. ExtValCoreConfiguration) and register it via: ExtValCoreConfiguration.use( customExtValCoreConfiguration, true);28.11.2010 DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 12
    • Support for @Valid (BV Module) - 1• MyFaces ExtVal allows validation of constraints within custom types via the @Valid BV-Annotation28.11.2010 DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 13
    • Support for @Valid (BV Module) - 2• Example public class CustomType { @NotNull Constraints within a cusotm type. private String property1; @Size(min = 3) private String property2; //... } public class MyBean { @NotNull @Valid private CustomType property; //... }28.11.2010 DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 14
    • Interoperability• MyFaces CODI • CDI based dependency injection for constraints validators will be done by CODI if both libs are used.• MyFaces Ext-Script28.11.2010 DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 15
    • Misc• Improved JSF 2.0 support• Bugfixing based on Community Feedback• Moved to JUL (from Commons-Logging)• Improved JavaDoc and JUnit Tests• Started to move the documentation to http://cwiki.apache.org/confluence/display/EXTVAL/• Add-ons • Multi-Field-Validation for BV (new) • Required Label (new) • Existing Add-ons will continue at Bitbucket28.11.2010 DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 16
    • Links• http://svn.apache.org/repos/asf/myfaces/extensi ons/validator• http://issues.apache.org/jira/browse/EXTVAL• http://wiki.apache.org/myfaces/Extensions/Valid ator/Versions/Versions/UpgradeGuide• http://os890.blogspot.com• http://code.google.com/p/os890/source/browse/tr unk/java/web/jsf/extval• http://bitbucket.org/os890/• http://people.apache.org/~gpetracek/myfaces/ex tval28.11.2010 DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 17