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