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

Juergen Donnerstag commented on WICKET-3197:
--------------------------------------------

The problem actually is that the component already is detached when 
addOrReplace() copies the markup ID to the new component. Copying / retrieving 
means we first try to read the markup to find the id. Since it's already 
detached the error occurs. IMO the right solution is a hidden copy method 
Component.setMarkupId(Component)

Juergen

> getMarkupId() can be used only if the component's markup is attached
> --------------------------------------------------------------------
>
>                 Key: WICKET-3197
>                 URL: https://issues.apache.org/jira/browse/WICKET-3197
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: Martin Grigorov
>            Assignee: Juergen Donnerstag
>         Attachments: wicket-3197.tgz
>
>
> With change r1037139 Component#getMarkupImpl() first tries to get the markup 
> id from the component's markup.
> If the markup is not available/attached yet for this component the call ends 
> with :
> org.apache.wicket.markup.MarkupException: Can not determine Markup. Component 
> is not yet connected to a parent. [Component id = label]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to