On 7/7/07, Kent Tong <[EMAIL PROTECTED]> wrote: > Martijn Dashorst <martijn.dashorst <at> gmail.com> writes: > > > For a Java bean class, most likely every field is to be read sooner > or later. According to this argument of speed, we should simply > use public fields for all Java bean classes? As I said before, I > don't see why Wicket code is in a special position to have this > access, while other code (eg, domain code) using that Java bean > class shouldn't.
the reason why we use getters and setters and not public fields is because we never know what is going to happen later - and because it is hard to refactor public field access into a getter or a setter we opt for the more flexible, but more verbous way first. with property model this argument does not exist. it first tries to look for a getter/setter and if not found defaults to the field itself. so a refactoring there - if you are only concerned with property models, is to simply put a getter/setter in place. -igor ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user