[
https://issues.apache.org/jira/browse/WICKET-2113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675762#action_12675762
]
Timo Rantalaiho commented on WICKET-2113:
-----------------------------------------
It cannot be removed in 1.4, because 1.4 should be as compatible as possible
with 1.3 -- it's been renamed to Component.setDefaultModelObject .
> Fix Compenent#setModelObject API documentation (or fix/remove call to
> checkHierarchyChange?)
> --------------------------------------------------------------------------------------------
>
> Key: WICKET-2113
> URL: https://issues.apache.org/jira/browse/WICKET-2113
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.3.4
> Reporter: Peter Parson
> Priority: Minor
>
> The javadoc says
> 'Sets the backing model object; shorthand for getModel().setObject(object).'
> The second part is not exactly right, since setModelObject(object) calls
> checkHierarchyChange, which means that it cannot be called after render phase
> has started.
> getModel().setObject(object) works for this use case, though.
> If this behavior is intended, this fact should at least be mentioned in the
> javadoc, since it is not quite obvious why one gets a
> "Cannot modify component hierarchy after render phase has started (page
> version cant change then anymore)"
> exception when trying to update a model.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.