You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Martijn Dashorst <ma...@gmail.com> on 2007/09/06 23:28:24 UTC

JavaDoc for IWrapModel and detach logic

Can anyone make heads/tails of this javadoc?

"The wrapped model will be called detach on when the component is
detached when the wrap model is created by an {@link
IComponentAssignedModel}"

What does this mean? Is this the explanation?

"When the component is detached and when the wrap model is created by
an {@link IComponentAssignedModel} Wicket will call detach() on the
wrapped model."

But why is this specific to the IComponentAssignedModel, and not for
all IWrapModels?

Martijn

/**
 * A marker interface that represents a model that serves as a wrapper
for another. Typically these
 * models are produced by the following methods:
 * {@link IComponentAssignedModel#wrapOnAssignment(org.apache.wicket.Component)}
and
 * {@link IComponentInheritedModel#wrapOnInheritance(org.apache.wicket.Component)}
 *
 * The wrapped model will be called detach on when the component is
detached when the wrap model is
 * created by an {@link IComponentAssignedModel}
 *
 * @author jcompagner
 * @author Igor Vaynberg (ivaynberg)
 */
public interface IWrapModel extends IModel
{
	/**
	 * Gets the wrapped model.
	 *
	 * @return The wrapped model
	 */
	IModel getWrappedModel();
}


-- 
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/