But In the form case, It's really nice to be able todo form.getModelObject which if you use generics will return the right object with typesafety...

Unless you have forms which contain different classes, but that would not make much sense..

Stefan Lindner wrote:
In this cases use

new AjaxButton("cancelButton") {
        @Override
        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
                modal.close(target);
       }
}


-----Ursprüngliche Nachricht-----
Von: Artur W. [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. Oktober 2008 12:40
An: [email protected]
Betreff: RE: Migration to 1.4 - generic headache


Hi Stefan!

Stefan Lindner wrote:
Use a Void Link (Link<Void>) or create your own Link wrapper class

        Class MyLink extends Link<Void>


I know I can create a wrapper but it is a ugly was to solve my problem :/

The Void think is a good idea but it doesn't work everywhere. For example
this doesn't compile:

new AjaxButton("cancelButton") {
        @Override
        protected void onSubmit(AjaxRequestTarget target, Form&lt;Void&gt; 
form) {
                modal.close(target);
       }
}


Artur


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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

Reply via email to