I think we shouldn't want to get rid of the class argument. Trying to find out the type in runtime seems like abusing reflection to me. Generics were not meant to be used as runtime.
I suggest the TextField constructor changes to TextField(MarkupContainer parent, String id, Class<T> type) or maybe TextField(MarkupContainer parent, String id, Class<? extends T> type); Btw. I wonder if it wouldn't be slightly better in component to have IModel<? extends T> than IModel<T> ... -Matej Eelco Hillenius wrote: > We're not gonna get rid of the type parameter in TextField I'm afraid. > Or was someone able to get the runtime parameter type reliably? > > Eelco > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Wicket-develop mailing list > Wicket-develop@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-develop > Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Wicket-develop mailing list Wicket-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-develop