You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org> on 2009/11/27 19:59:20 UTC
[jira] Created: (EXTVAL-73) pluggable severities
pluggable severities
--------------------
Key: EXTVAL-73
URL: https://issues.apache.org/jira/browse/EXTVAL-73
Project: MyFaces Extensions Validator
Issue Type: New Feature
Components: Bean Validation, Core, Property Validation
Affects Versions: 1.2.3-SNAPSHOT, 2.0.3-SNAPSHOT, 1.1.3-SNAPSHOT
Reporter: Gerhard Petracek
it should be possible to register custom validation parameter / payload as replacement for the default severity parameters to allow independent constraints without dependency to the framework.
examples
register custom payload (for jsr303):
ExtValContext.getContext().addGlobalProperty(ViolationSeverity.Warn.class.getName(), CustomBvViolationSeverity.Warning.class);
ExtValContext.getContext().addGlobalProperty(ViolationSeverity.Error.class.getName(), CustomBvViolationSeverity.Error.class);
...
usage:
@NotNull(payload = CustomBvViolationSeverity.Warning.class)
register custom validation parameter (for extval annotations):
ExtValContext.getContext().addGlobalProperty(ViolationSeverity.class.getName(), CustomExtValViolationSeverity.class);
usage:
@CustomRequired(parameters = CustomExtValViolationSeverity.Warning.class)
the custom implementations behave like the default implementations (automatically) with the advantage that there is no dependency to extval
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (EXTVAL-73) pluggable severities
Posted by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTVAL-73?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gerhard Petracek resolved EXTVAL-73.
------------------------------------
Resolution: Fixed
Fix Version/s: 1.1.3-SNAPSHOT
2.0.3-SNAPSHOT
1.2.3-SNAPSHOT
> pluggable severities
> --------------------
>
> Key: EXTVAL-73
> URL: https://issues.apache.org/jira/browse/EXTVAL-73
> Project: MyFaces Extensions Validator
> Issue Type: New Feature
> Components: Bean Validation, Core, Property Validation
> Affects Versions: 1.2.3-SNAPSHOT, 2.0.3-SNAPSHOT, 1.1.3-SNAPSHOT
> Reporter: Gerhard Petracek
> Fix For: 1.2.3-SNAPSHOT, 2.0.3-SNAPSHOT, 1.1.3-SNAPSHOT
>
>
> it should be possible to register custom validation parameter / payload as replacement for the default severity parameters to allow independent constraints without dependency to the framework.
> examples
> register custom payload (for jsr303):
> ExtValContext.getContext().addGlobalProperty(ViolationSeverity.Warn.class.getName(), CustomBvViolationSeverity.Warning.class);
> ExtValContext.getContext().addGlobalProperty(ViolationSeverity.Fatal.class.getName(), CustomBvViolationSeverity.Fatal.class);
> ...
> usage:
> @NotNull(payload = CustomBvViolationSeverity.Warning.class)
> register custom validation parameter (for extval annotations):
> ExtValContext.getContext().addGlobalProperty(ViolationSeverity.class.getName(), CustomExtValViolationSeverity.class);
> usage:
> @CustomRequired(parameters = CustomExtValViolationSeverity.Warning.class)
> the custom implementations behave like the default implementations (automatically) with the advantage that there is no dependency to extval
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.