THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
public final void setObject(final Object object) { throw new UnsupportedOperationException("Model " + getClass() + " does not support setObject(Object)"); } |
Note that the LoadableDetachableModel
inherits from AbstractReadOnlyModel
.
The StringResourceModel
we talked about above is another fine example of loadable detachable (and therefore read-only) model, since resource strings are read-only in nature. Actually, the StringResourceModel
is a subclass of LoadableDetachableModel
.
...