You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Balaji Saranathan <ba...@wipro.com> on 2005/06/14 16:49:56 UTC

Adding a validator programmatically


Hi,

I'm trying to create a custom component and one of my requirements is to
attach the Regular Expression Validator of myfaces to the input fields
created by the component. I did a addValidator() to the HtmlInputText
component that I created in the encodeChildren() of the custom component
class. However, the validate() is not being called at all. Am I missing
something here?

TIA
bala




Confidentiality Notice 

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.

Re: Adding a validator programmatically

Posted by Csík Norbert <no...@gmail.com>.
Maybe the encodeChildren method is never called. Due to the spec "This
method will only be called if the rendersChildren property is true."

On 6/14/05, Balaji Saranathan <ba...@wipro.com> wrote:
> 
> 
> Hi,
> 
> I'm trying to create a custom component and one of my requirements is to
> attach the Regular Expression Validator of myfaces to the input fields
> created by the component. I did a addValidator() to the HtmlInputText
> component that I created in the encodeChildren() of the custom component
> class. However, the validate() is not being called at all. Am I missing
> something here?
> 
> TIA
> bala
> 
> 
> 
> 
> Confidentiality Notice
> 
> The information contained in this electronic message and any attachments to this message are intended
> for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
> you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately
> and destroy all copies of this message and any attachments.
> 


-- 
 Norbert Csík