On 8/21/07, sudheerp <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I am using appfuse-jsf 1.9.4.
>
> I have an input field like this
>
> <h:outputLabel styleClass="desc" for="toDate"
> value="#{text['concernedPersons.toDate']}"/>
> <h:inputText styleClass="text small" id="toDate"
> value="#{concernedPersonsForm.concernedPersons.toDate}"
> validator="#{concernedPersonsForm.validateToDate}">
> <f:convertDateTime pattern="#{text['date.format']}"/>
> </h:inputText>
> <t:message for="toDate" styleClass="fieldError"/>
>
> And in my concernedPersonsForm bean I have a validateToDate method like
> below
>
>
> public void validateToDate( FacesContext context, UIComponent
> componentToValidate, Object value) throws ValidatorException
> {
> FacesMessage message = new FacesMessage("Test Validator" );
> throw new ValidatorException(message);
> }
>
>
> but the above function is not getting executed. What is wrong with this
> method ?
> If this method is wrong which is the best method to write a validator ?
If it's not working, my guess would be "no". Sorry, I've never written
a custom validator for JSF, but I'm sure Google has some information
on this topic.
Matt
>
> Thank you.
>
> Sudheer
> --
> View this message in context:
> http://www.nabble.com/Is-this-a-correct-way-to-validate-a-user-input---tf4304923s2369.html#a12253818
> Sent from the AppFuse - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
http://raibledesigns.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]