We have a table component, that only accepts an ITableModel to be assigned to it. That tableModel has an interface to access rows & columns (remember the swing list & table models). We would just love that table component to return an ITableModel when calling getModel() (only possible with JDK5, for sure).
Of course we could have our own getTableModel() method, but that's not so nice. Jan. Johan Compagner wrote: > > i would love to see an example where it is really needed. > Because a model is already something to delay the creation of the > modelobject itself > So why override getModel() to also delay that? Why can't you do that in > getObject() of that model?? > > johan > > > On 4/26/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: >> >> If you are really, really sure overriding getModel is the only >> reasonable way to go, we can consider not having it final and put a >> big warning in the docs instead. However, this is such a core feature >> that we really wouldn't want people to get the wrong idea. Are you >> sure there is no acceptable alternative? >> >> Eelco >> >> >> On 4/25/07, Stefan Lindner <[EMAIL PROTECTED]> wrote: >> > We also have components with our own getModel implementation because of >> special Models that extend Imodel and it would be very hard for us to go >> around this if getModel is final. >> > >> > Stefan Lindner >> > >> > -----Ursprüngliche Nachricht----- >> > Von: Jan Vermeulen [mailto:[EMAIL PROTECTED] >> > Gesendet: Mittwoch, 25. April 2007 17:46 >> > An: [email protected] >> > Betreff: Re: Timeframe to move wicket & wicket-ext projects to JDK1.5 >> > >> > >> > >> > Johan Compagner wrote: >> > > >> > > typecast? in 2.0 you didn't have to cast when using the model or >> > > getModelObject() >> > > where did you need to cast? >> > > >> > I'm not referring to the object of the model, but to the model itself: >> we have extended models that implement specific interfaces that allow >> other >> operations than just getObject() or setObject(), so that's where it comes >> in >> handy if getModel() returns the extended interface. >> > >> > And yes, I owe you some performance statistics to prove my point on >> initModel(), but for now I'm stuck without a profiling tool... >> > >> > Jan. >> > -- >> > View this message in context: >> http://www.nabble.com/Timeframe-to-move-wicket---wicket-ext-projects-to-JDK1.5-tf3638110.html#a10183375 >> > Sent from the Wicket - Dev mailing list archive at Nabble.com. >> > >> > >> > > -- View this message in context: http://www.nabble.com/Timeframe-to-move-wicket---wicket-ext-projects-to-JDK1.5-tf3638110.html#a10197086 Sent from the Wicket - Dev mailing list archive at Nabble.com.
