I think your test is wrong. Don't you want

                         if (field instanceof MyInput){
?

Dave

We must begin not just to act, but to think, for there is no better slave
than the one who believes his slavery to be freedom, and we are in
no greater peril than when we cannot see the chains on our minds
because there are yet no chains on our feet.
-- Michael Reid




                                                                           
             riccaruf                                                      
             <riccardo.ruffill                                             
             [EMAIL PROTECTED]                                          To 
             .com>                     users@tapestry.apache.org           
                                                                        cc 
             01/22/2008 12:09                                              
             PM                                                    Subject 
                                       t5 class cast                       
                                                                           
             Please respond to                                             
             "Tapestry users"                                              
             <[EMAIL PROTECTED]                                             
                pache.org>                                                 
                                                                           
                                                                           





Hi everybody, I've got this kind of method in my validator class

    public void render(Field field, Void constraintValue, MessageFormatter
formatter, MarkupWriter writer,
            FormSupport formSupport) {

                         System.out.println("### field:"+field);
                         Field inputField=field;
                         if (field instanceof SailingInput){
                                     MyInput si=(MyInput)field;
                                     inputField=si.get();
                         }
                         formSupport.addValidation(inputField, "test",
buildMessage(formatter,
field), null);
             }

this is the output

### field:[EMAIL PROTECTED]
but the cast has never done.
Any ideas ?

thanks in advance.

-Rick

--
View this message in context:
http://www.nabble.com/t5-class-cast-tp15023351p15023351.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to