wicket.model
Class AbstractReadOnlyDetachableModel

java.lang.Object
  extended by wicket.model.AbstractDetachableModel
      extended by wicket.model.AbstractReadOnlyDetachableModel
All Implemented Interfaces:
java.io.Serializable, IDetachable, IModel
Direct Known Subclasses:
StringResourceModel

public abstract class AbstractReadOnlyDetachableModel
extends AbstractDetachableModel

Adds a default implementation of onSetObject() which throws an UnsupportedOperationException to indicate that the subclass is a read-only model.

Author:
Jonathan Locke
See Also:
Serialized Form

Constructor Summary
AbstractReadOnlyDetachableModel()
           
 
Method Summary
protected  void onSetObject(Component component, java.lang.Object object)
          This default implementation of onSetObject unconditionally throws an UnsupportedOperationException.
 java.lang.String toString()
           
 
Methods inherited from class wicket.model.AbstractDetachableModel
attach, detach, getNestedModel, getObject, isAttached, onAttach, onDetach, onGetObject, setObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractReadOnlyDetachableModel

public AbstractReadOnlyDetachableModel()
Method Detail

onSetObject

protected final void onSetObject(Component component,
                                 java.lang.Object object)
This default implementation of onSetObject unconditionally throws an UnsupportedOperationException. Since the method is final, any subclass is effectively a read-only model.

Specified by:
onSetObject in class AbstractDetachableModel
Parameters:
component - The component wanting to set the object
object - The object to set into the model
Throws:
java.lang.UnsupportedOperationException

toString

public java.lang.String toString()
Overrides:
toString in class AbstractDetachableModel
See Also:
Object.toString()


Copyright © 2004-2007 Wicket developers. All Rights Reserved.