I think that's a good idea - I have done a similar thing in my own projects. Please open a JIRA so this idea doesn't get lost, but this is one I may try to do soon.
-- Jeremy Thomerson http://www.wickettraining.com On Wed, Apr 8, 2009 at 4:36 PM, Juan G. Arias <juangar...@gmail.com> wrote: > Hi all,First of all, I'm using wicket 1.3.5 > > I'm writing a model and ai need it to be "chaineable". I mean, I need this > model to contain another model, so my model can obtain the data, for > example, from a property model. > Ok, I've been reading and this is solved by the IChainingModel. > > But I couldn't find any default implementation of this interface. > There are two classes currently implementing this interface, > AbstractPropertyModel and CompoundPropertyModel. > Both classes has some code duplicated, specifically: > - void detach() > - IModel getChainedModel() > - void setChainedModel(IModel model) > - some lines of void setObject(Object object) > - the code in CompuntPropertyModel#getObject() and > AbstarctPropertyModel#getTarget() is different, but the logic is the same. > > And I'm afraid my code will be the same as those classes. > > So, finally, my point. > Is there any default implementation of this behavior? Is there a chance to > add a super-class with this code? > > Thanks! > Juan Arias >