posted 15 years ago
Hello! I have a custom tag where I want to add and HtmlInputText with a validator. I use the following code:
In my encodeBegin method I call a private method with:
ImportValidator obValidator = new ImportValidator();
FacesContext context = getFacesContext();
inputText.setId(id);
inputText.addValidator(obValidator);
inputText.setValue(value);
inputText.setStyleClass(styleClass);
inputText.setParent(this);
inputText.encodeBegin(context);
inputText.encodeEnd(context);
Of course my ImportValidator implements Validator class.
Do I need something more to use the validator?
Thanks.