You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by Apache Wiki <wi...@apache.org> on 2006/04/21 17:03:47 UTC
[Myfaces Wiki] Update of "OptionalValidationFramework" by MikeKienenberger
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.
The following page has been changed by MikeKienenberger:
http://wiki.apache.org/myfaces/OptionalValidationFramework
The comment on the change is:
Added note about subforms. Added section on using only the required validator.
------------------------------------------------------------------------------
== Optional Validation Framework ==
===== Authors: Mike Kienenberger, Alexander Jesse =====
An optional validation framework is available as module OptionalValidator in cvs for the jsf-comp [http://sourceforge.net/cvs/?group_id=137466 ] project.
+
+ {{{
+ Note: I recommend evaluating the use of the sandbox subForm or ADF subform partial form validation components as an alternative to this framework -- Mike kienenberger
+ }}}
This optional validator framework allows you to change the behavior of validators in a form. JSF allows you limited two-stage control of validation using the immediate attribute. However, this is only sufficient for trivial use cases. It does not work well if you have multiple actions requiring multiple validation configurations on the same form. It also does not provide a warning-only mode where validation errors are reported in a non-fatal manner.
@@ -72, +76 @@
* The SubmittedValueCollectorWalker component must be placed before all other validating components in the MyFaces implementation in order to preserve submitted values and update invalidated component status before the update-model phase. Safest bet is to put it right after the <h:form> tag. This is probably also true for other JSF implementations.
+ === Using only the required validator parts of this framework ===
+
+ If all you want is to use a required validator instead of the required attribute on a component, do something like this. The required validator parts of this framework should work with vanilla JSF 1.1, and have been relatively-well tested.
+
+ {{{
+ <h:form>
+ <jsfcomp:submittedValueCollectorWalker/>
+
+ <uiinput>
+ <jsfcomp:requiredValidator/>
+ <uiinput/>
+
+ <uiinput>
+ <jsfcomp:requiredValidator/>
+ <uiinput/>
+
+ <jsfcomp:requiredValidatorChecker/>
+ </h:form>
+ }}}
+