model wrapper for ReuseIfModelsEqualStrategy or alternative reuse strategy?

2007-08-27 Thread Eelco Hillenius
Hi, For Wicket In Action in converted an example from a ListView to a RepeatingView. This example has to function in a form, so I set the 'ReuseIfModelsEqualStrategy'. Overriding hashCode (and equals) on the model however results in quite a bit of code bloat, while my hunch is that comparing the

Re: model wrapper for ReuseIfModelsEqualStrategy or alternative reuse strategy?

2007-08-27 Thread Igor Vaynberg
the reason i did not provide this when i wrote the repeaters package is that it can lead down some pretty awful roads. an easy example where this goes totally wrong is when you use detachable models for the items. if you use this decorator all models from the previous page will be loaded because

Re: model wrapper for ReuseIfModelsEqualStrategy or alternative reuse strategy?

2007-08-27 Thread Eelco Hillenius
On 8/27/07, Igor Vaynberg [EMAIL PROTECTED] wrote: the reason i did not provide this when i wrote the repeaters package is that it can lead down some pretty awful roads. an easy example where this goes totally wrong is when you use detachable models for the items. if you use this decorator all

Re: model wrapper for ReuseIfModelsEqualStrategy or alternative reuse strategy?

2007-08-27 Thread Matej Knopp
Perhaps IEntityModel Object getEntityId/PK() would be better name? ICompressedModel doesn't really say much, sounds too abstract to me. Also I could live with EqualsDecorator as long as it clearly states with CAPITAL LETTERS that it can't be used on detachable models :) -Matej On 8/27/07, Eelco

Re: model wrapper for ReuseIfModelsEqualStrategy or alternative reuse strategy?

2007-08-27 Thread Igor Vaynberg
i dont know if we want to go down this road. its a mixin that is not very obvious, how many people do you think know about IStyledColumn? besides it might be two objects that represent the pk - like two longs for composite pks. i really dont think it is that big a deal to implement equals/hashcode