Hi All,
I want add property in my custom validator.
I did it but it always return null.
Can any body help?

here are what I did :
in the validatorTag

    private String _methodName = null;
   
    public void setMethodName(String string) {
            _methodName = string;
    }

    protected Validator createValidator() throws JspException
    {
        ......
         if (_methodName != null)
        {
                if (UIComponentTag.isValueReference(_methodName))
                {
                        ValueBinding vb = facesContext.getApplication().createValueBinding(_methodName);
                        validator.setMethodName(new String(vb.getValue(facesContext).toString()));
                }
                else
                {
                        validator.setMethodName(_methodName);
                }
        }
       
        return validator;
    }

and in the Validator:

     public String getMethodName() {
        return _methodName;
    }

     public void setMethodName(String string) {
            _methodName = string;
    }

and I added it in the tld

but always return null when I try to use it.

--
Ali Abdel-Aziz
http://www.aliabdelaziz.com
http://aabdelaziz.blogspot.com

Reply via email to