On Wed, Sep 10, 2008 at 3:02 AM, Stefan Kogler
<[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> i have a problem with validators in Trinidad.
>
> I wrote a custom validator for an integer.
>
> Now when i type in my field a valid Integer like '1' und submit my form
> everything works fine -> my custom validator is called.
>
> When i type in a not valid value like 'A' i get an faces message 'Not an
> Integer' but
> my custom validator is never called.

this is correct. The conversion fails already. How should Trinidad (JSF) know
what "A" means ? What you could do is just write a custom converter, to do some
mapping

A <==> 1
B <==> 2
C <==> 3
...

it is described here:
http://www.jroller.com/mwessendorf/entry/ajax_client_side_convertion_with

and it works for Trinidad as well!

>
> It seems that trinidad validates the value automatically and if its not
> valid the specified
> custom validator will not be called.

Read on the JSF lifecycle, the validate phase.
it trys to convert the data and (only) runs the validators afterwards.

Since A is not an integer, no validation is executed.

-Matthias

>
> I disabled the client-side-validation in the trindad-config.xml so thats
> should not be the problem.
>
> Can anybody help me?
>
> Greetz
>
> --
> Stefan Kogler
> Informationstechnik Organisation, ITO
>
> KATHREIN-Werke KG
> Anton-Kathrein-Straße 1-3
> P.O. Box 100 444
> 83004 Rosenheim, Germany
>
> Tel.: +49 8031 184-5837
> Fax: +49 8031 184-525837
>
> E-Mail: [EMAIL PROTECTED]
> Internet: http://www.kathrein.de
> --
> Registergericht / Register court: Amtsgericht Traunstein, HRA 460 / local
> court Traunstein, certificate of registration no. 460
> Geschäftsführender persönlich haftender Gesellschafter / Personally liable
> managing partner: Prof. Dr. Dr. h.c. Anton Kathrein, Dipl.-Betriebswirt
> (MBA-equivalent)
> Erfüllungsort und Gerichtsstand / Place of performance and place of
> jurisdiction: Rosenheim
>
> This e-mail is confidential and may contain privileged information. If you
> have received this communication in error, please notify us immediately by
> responding to this email and then delete it from your system. The sender
> therefore does not accept liability for any errors or omissions in the
> contents of this message which arise as a result of e-mail transmission. We
> believe but do not warrant that this e-mail and any attachments are virus
> free. You must therefore take full responsibility for virus checking.
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

Reply via email to