Description
Internally,
setDefaultModelObject()
calls
modelChanging()
calls
checkHierarchyChange()
which throws an exception when in render phase.
I do not think that changing a model's object is a change in hierarchy. (This is why I filed this as "bug".)
Otherwise getDefaultModel().setObject() should throw an exception also.
And why is setDefaultModelObject() behaving different from getDefaultModel().setObject() at all? (This I would actually call a "usability problem"... it looks like a convenience method, but does a lot of other things under the hood)
As it is quite confusing, maybe setDefaultModelObject() should be renamed to reflect the difference in behavior?