Yep, you're right. But what I meant was: 'shouldn't we compare the model objects instead of the IModels?

Juergen Donnerstag wrote:

Are you sure? From a technical point of view it prevents a NPE if
getModel() == null.


Juergen


On Sun, 02 Jan 2005 20:44:42 +0100, Eelco Hillenius
<[EMAIL PROTECTED]> wrote:


This (in Component.invalidateModel)

                           // If the components have the same equals
identity (which is
                           // assumed to be implemented in terms of
database identity)
                           // and component is accessing the same
property of the model
                           if (current.getModel() != null
                                   && getModel() != null
                                   && current.getModel().equals(getModel())
                                   && current.getName().equals(getName()))
                           {
                               // then make the page holding the
component stale
                               currentPage.setStale(true);
                           }

should probably be:

                           // If the components have the same equals
identity (which is
                           // assumed to be implemented in terms of
database identity)
                           // and component is accessing the same
property of the model
                           if (current.getModelObject() != null
                                   && getModelObject() != null
                                   && current.getModel().equals(getModel())
                                   && current.getName().equals(getName()))
                           {
                               // then make the page holding the
component stale
                               currentPage.setStale(true);
                           }

Agreed?

Eelco





------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to