On 12/13/05, Matthias Kahlau <[EMAIL PROTECTED]> wrote:
> 1) In which phase are these methods invoked? Always in process validations
> or dependent on immediate setting?

apply-values if immediate=true for the component
process-validations if immediate=false for the component.

> 2) Which is the right method to get the values of other components in the
> validator method, getSubmittedValue(), getLocalValue(), dependent on
> configuration issues (immediate) of the component owning the validator and
> other components asked in the validator method?

Depends.   If the other component hasn't been validated (or conversion
or validation failed), then submitted value.   If the component
converted and validated, then the local value.

You can look at the sandbox
org.apache.myfaces.custom.comparetovalidator.CompareToValidator as an
example of how to figure this all out -- it's pretty convoluted if
you're not in a subclass of UIComponentBase.   I'm open to ideas on
how to better "share" this code with other classes as it seems like it
could be useful elsewhere.

Reply via email to