Nothing directly. The only thing you should do is propagate the
'detach' method to your nested eventModel. The chaining model is
merely interesting for consumers of your model, so they can get to the
embedded model using a specified API.
>From chapter 5 "Understanding Models" of Wicket in Action (the custom
models part where the quote comes from may become an appendix though):
"To summarize, when you want to chain models, be sure to propagate the
detach call to the chained models. This way the whole chain will be
detached. If your custom model is part of a public API, your clients
will most likely thank you when you implement the IChainingModel
interface, providing them access to the inner model."
The IWrapModel is used for marking models that have been wrapped using
IComponentAssignedModel or IComponentInheritedModel.
Martijn
On 9/11/07, Leszek Gawron <[EMAIL PROTECTED]> wrote:
> Assuming eventModel is loadable detachable model sould I implement some
> marker interfaces in the following model?
>
> > private static class SystemWarningEventImagePathModel extends
> > AbstractReadOnlyModel {
> > private IModel eventModel;
> >
> > public SystemWarningEventImagePathModel( IModel eventModel ) {
> > this.eventModel = eventModel;
> > }
> >
> > @Override
> > public Object getObject() {
> > SystemWarningEvent event = (SystemWarningEvent)
> > eventModel.getObject();
> > return event.isReadFlag() ? "img/mobile/event_read.png" :
> > "img/mobile/event_new.png";
> > }
> > }
>
>
> There are a number to take into account: IWrapModel, IChainingModel.
> Please advise.
>
> --
> Leszek Gawron
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]