ClientValidator renderer getScript method:
- performs arguments check ( not null, behavior is instance of ClientValidatorBehavior.
- If Converter script found, get Collection of validators from behavior. If collection is empty, return null instead of script. Otherwise, loop through all validators to construct client-side validator function, using ClientScriptLookupService. Record number of validators that cannot be performed on client.
- If there is no Converter script or at least one validator has no client-side version, add AJAX callback to client-side validator.
- Find or Create UIValidatorScript in UIView.viewResources associated with "form" target. Create ScriptObject that will be used to build validator call. If UIValidatorScript already contains ScriptObject with same signature use its function name for page size optimization. Problem: JSF 2.0 doesn't like components tree changes, and specification does not allow dynamic including of script libraries. At least, it seems not possible to change controls with client-side validation by AJAX. Solution: use the same way as queue component ( create UIValidatorScript in ViewHandler )