Peter Parson created WICKET-4914:
------------------------------------
Summary: Component#setDefaultModelObject() in beforeRender throws
Exception: "Cannot modify component hierarchy after render phase has started"
Key: WICKET-4914
URL: https://issues.apache.org/jira/browse/WICKET-4914
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 6.2.0
Reporter: Peter Parson
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?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira