You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Matej Knopp (JIRA)" <ji...@apache.org> on 2007/10/16 00:40:51 UTC

[jira] Assigned: (WICKET-1073) No Page found for component in AjaxRequestTarget.detach()

     [ https://issues.apache.org/jira/browse/WICKET-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matej Knopp reassigned WICKET-1073:
-----------------------------------

    Assignee: Matej Knopp

> No Page found for component in AjaxRequestTarget.detach()
> ---------------------------------------------------------
>
>                 Key: WICKET-1073
>                 URL: https://issues.apache.org/jira/browse/WICKET-1073
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Matt Clark
>            Assignee: Matej Knopp
>
> Please see the scenario below, entered per Matej's request.  I'm not 100% sure I'm not doing something invalid by having a component add its ancestor to the AjaxRequestTarget, but in my scenario the child doesn't necessarily know the ancestor is eventually going to be added to the target.  If Wicket as able to handle the scenario where we can add components to the target without knowing whether component being added will later be removed from the page hierarchy, that would make it easier to have multiple components on a page tied to a common model updated via Ajax.
> http://www.nabble.com/forum/ViewPost.jtp?post=13191716&framed=y
> * Assume the following hierarchy:
> Page
>  - Panel
>    - RefreshingView
>      - ComponentA
> * ComponentA receives an Ajax event (onClick(AjaxRequestTarget))
> * ComponentA eventually adds Panel to the AjaxRequestTarget
> * Refreshing view is re-rendered as a part of the ajax request cycle, generating a ComponentA(prime).  Original ComponentA is now no longer a part of the page hierarchy.
> * During the detach phase, the following code in AjaxRequestTarget is called:
>   // detach the page if it was updated
>   if (markupIdToComponent.size() > 0)
>   {
>         final Component component = (Component)markupIdToComponent.values().iterator().next();
>         component.getPage().detach();
>   }
> * The object which comes out of the list (iterator().next()) appears to be ComponentA, which is no longer in the page hierarchy.  Therefore component.getPage() fails with "No page found for component" 

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