You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Juergen Donnerstag (JIRA)" <ji...@apache.org> on 2009/02/22 19:09:01 UTC

[jira] Commented: (WICKET-2113) Fix Compenent#setModelObject API documentation (or fix/remove call to checkHierarchyChange?)

    [ https://issues.apache.org/jira/browse/WICKET-2113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675682#action_12675682 ] 

Juergen Donnerstag commented on WICKET-2113:
--------------------------------------------

For this reason Component.setModelObject has been removed in 1.4

> 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
>
> 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.