Your SlideShare is downloading. ×
0
MyFaces Extensions Validator 1.x.2 News
MyFaces Extensions Validator 1.x.2 News
MyFaces Extensions Validator 1.x.2 News
MyFaces Extensions Validator 1.x.2 News
MyFaces Extensions Validator 1.x.2 News
MyFaces Extensions Validator 1.x.2 News
MyFaces Extensions Validator 1.x.2 News
MyFaces Extensions Validator 1.x.2 News
MyFaces Extensions Validator 1.x.2 News
MyFaces Extensions Validator 1.x.2 News
MyFaces Extensions Validator 1.x.2 News
MyFaces Extensions Validator 1.x.2 News
MyFaces Extensions Validator 1.x.2 News
MyFaces Extensions Validator 1.x.2 News
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

MyFaces Extensions Validator 1.x.2 News

2,189

Published on

These slides give a short overview of the new MyFaces ExtVal v1.x.2 features

These slides give a short overview of the new MyFaces ExtVal v1.x.2 features

Published in: Technology, Design
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,189
On Slideshare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. JSF in der Praxis
  • 2. MyFaces Extensions-Validator What’s new in version 1.x.2 DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 20.04.09 2
  • 3. Agenda • Improved Trinidad Support • Cross-validation vs. Model-Aware Cross-validation • Reverse Violation Messages • MetaDataExtractionInterceptors • Optional Custom Skip-Validation Markers • Pluggable Name-Mappers • Improved EL-Map-Syntax Support • New Add-ons DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 20.04.09 3
  • 4. Improved Trinidad Support • Improved client-side validation • Support for • CoreOutputLabel • LabeledFacesMessage DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 20.04.09 4
  • 5. Cross-validation vs. Model- Aware Cross-validation • Cross-validation now detects the target automatically • That means: If the validation target isn’t available in the current request, validation is performed with the model value DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 20.04.09 5
  • 6. Reverse Violation Messages • Model aware cross-validation might lead to • Inconsistent validation messages • Missing target to display validation error msg • Solution: reverse validation message • Optional possibility to provide a meaningful validation error message • Displayed at the source component DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 20.04.09 6
  • 7. MetaDataExtractionInterceptors • Interceptor which is called after the metadata extraction and before the validation process • Possibility to add/change/remove constraints of the target property • Global mechanism • ExtValContext.getContext() .addMetaDataExtractionInterceptor(...) • @MetaDataExtractionInterceptor (available at the os890 ExtVal-Add-ons) DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 20.04.09 7
  • 8. Optional Custom Skip-Validation Markers • Default marker for skipable validation strategies is: @SkipValidationSupport • Now it’s possible to provide • Custom marker annotation(s) • Directly the validation strategy which is skipable e.g. via: //optional: direct usage of validation strategies StaticInMemoryConfiguration config = new StaticInMemoryConfiguration(); config.addMapping(CommonMetaDataKeys.SKIP_VALIDATION, RequiredStrategy.class.getName()); ExtValContext.getContext() .addStaticConfiguration(StaticConfigurationNames .SKIP_VALIDATION_SUPPORT_CONFIG, config); DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 20.04.09 8
  • 9. Pluggable Name-Mappers • Name-Mappers were located within factories • Now it’s possible to register name-mappers via ExtVal-Java-API – e.g.: ExtValContext.getContext().getFactoryFinder() .getFactory(FactoryNames.VALIDATION_STRATEGY_FACTORY, NameMapperAwareFactory.class)) .register(metaDataToValidationStrategyNameMapper) • Convenience methods are available at: ExtValUtils • @NameMapper (available at the os890 ExtVal-Add-ons) DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 20.04.09 9
  • 10. Improved EL-Map-Syntax Support • Improved support for nested map el- syntax in view of cross-validation • Bugfixes for ExtVal 1.1.1 (improved support of custom facelets components) DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 20.04.09 10
  • 11. New Add-ons • Bypass validation • Bypass validation for action methods • Bypass validation via Validation-Controller • Secure action methods DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 20.04.09 11
  • 12. Bypass Validation - Details • Bypass validation for action methods 3 example usages: • Bypass validation via Validation-Controller 2 example usages: DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 20.04.09 12
  • 13. Secure action methods - Details • Available attributes • viewIds • permittedIf • secureAction • secureOutcome • securityErrorMsgKey • regularLifecycleExecution • Further details at: http://os890.blogspot.com/2009/04/myface s-extval-add-on-securedaction.html DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 20.04.09 13
  • 14. Links • http://svn.apache.org/repos/asf/myfaces/extensi ons/validator • http://wiki.apache.org/myfaces/Extensions/Valid ator • http://issues.apache.org/jira/browse/EXTVAL • http://os890.blogspot.com • http://code.google.com/p/os890/source/browse/tr unk/java/web/jsf/extval • http://people.apache.org/~gpetracek/myfaces/ex tval DI (FH) Gerhard Petracek / MyFaces-Extensions-Validator 20.04.09 14

×