Description
To keep it compatible with current usage:
public final void setObject(Object obj) {
reload(obj);
tempModelObject = obj;
}
protected void reload(Object obj) {
throw new OperationNotSupportedException("Read only model");
}
Subclasses can now implement their own write logic. This is necessary for for instance stand alone dropdownchoice components that need to store their selection.
e.g.
MyPage {
IModel<SchoolYear> selectedSchoolYear;
public MyPage()
}
If HibernateModel is not writeable then the selected SchoolYear instance would end up in the session.
Attachments
Attachments
Issue Links
- is a clone of
-
WICKET-27 Make LoadableDetachableModel writable
- Resolved