Hi Cagatay,
Thanks for your pointers. I will look at the options.
With regards,
Damar
On 11/2/06, Cagatay Civici <[EMAIL PROTECTED]> wrote:
Hi,
There are several choices, you may try to write a validator method in your
managed bean and do a method binding to it via the validator attribute like;
<h:inputText validator="#{beanname.validatormethod }" />
public void validateCode(FacesContext facesContext, UIComponent component,
Object value) {
//throw new ValidationException if you think value is not valid
}
Also for better reusing, you can write your own validator and bind it to the
inputText by the <f:validator />
http://publib.boulder.ibm.com/infocenter/radhelp/v6r0m1/index.jsp?topic=/com.ibm.etools.jsf.doc/topics/tjsfcrvalidator.html
In addition you can create it's own tag for your validator like in;
http://www.jsffaq.com/Wiki.jsp?page=HowToCreateTheCustomValidator
Cagatay
On 11/2/06, Damar Thapa <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have one <h:inputText> field that I would like to validate against
> the availability of that entry in the database -- accept only if the
> input text is in the database. Can somebody in list list give me some
> pointers on this?
>
> Thanks,
>
> With regards,
>
> Damar Thapa
>
--
With regards,
Damar Thapa