It may be that I am misunderstanding but I remember I had problem setting 
values in my valueChangeListener method a while ago
because those values were overwritten after the valueChangeListener had been 
invoked...

BTJ

On Thu, 19 Oct 2006 15:13:00 -0400
Jeff Bischoff <[EMAIL PROTECTED]> wrote:

> Sure it will.
> 
> In your valueChangeListener:
> 1) Update your model as needed (i.e. explicitly call any setters for 
> properties you need to change the value of).
> 
> 2) Call refresh() from the wiki to update input components with the new 
> values. Do this only if needed, as it will replace anything the user has 
> entered with the model values. It's mainly useful on events that load 
> new data.
> 
> 3) Call skipValidation() to bypass the validations, including "required"
> 
> 
> What is it that you are trying to do where this pattern isn't sufficient?
> 
> Bjørn T Johansen wrote:
> > Well, I need to update my form with new data as a result of that value 
> > change, so as far as I can tell, using this
> > skipValidation metehod won't help me?
> > 
> > 
> > BTJ
> > 
> > On Thu, 19 Oct 2006 09:31:17 -0400
> > Jeff Bischoff <[EMAIL PROTECTED]> wrote:
> > 
> >> Bjorn,
> >>
> >> Put a method like this in some utility class in your web tier java code:
> >>
> >> public static void skipValidation() {
> >>    FacesContext context = FacesContext.getCurrentInstance();
> >>    context.renderResponse();
> >> }
> >>
> >> Then you can call skipValidation() in your valueChangeListener method.
> >>
> >> You may notice that input components are not updated with model values 
> >> that may have changed as a result of your immediate methods. If you, 
> >> this article [1] may be of use to you as well.
> >>
> >> [1] http://wiki.apache.org/myfaces/ClearInputComponents
> >>
> >> Regards,
> >>
> >> Jeff Bischoff
> >> Kenneth L Kurz & Associates, Inc.
> >>
> >> Bjørn T Johansen wrote:
> >>> I have some edit boxes that has the attribute required set to true but I 
> >>> also have a selectOneMenu which does
> >>> a submit when value changes... What is the best way to skip the required 
> >>> test when submitting using the
> >>> selectOneMenu onChange event?
> >>>
> >>>
> >>> Regards,
> >>>
> >>> BTJ
> >>>
> >>
> > 
> > 
> > 
> 
> 

Reply via email to