users@javaserverfaces.java.net

Dynamic method validation

From: (wrong string) é <jamarijr_at_gmail.com>
Date: Thu, 6 Dec 2007 12:47:57 -0500

I have a jsf page that I have to create without a jsp page, due to our
infrastructure. So I have an object like this:

emailAdd = new HtmlInputText();
...

How can I add a method validator to this object?
I tried this but it doesn't seem to work
        MethodBinding mb =
fc.getApplication().createMethodBinding("#{email.validateAddress}", new
Class[] {FacesContext.class,UIComponent.class,Object.class});
        emailAdd.setValidator(mb);