You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by MattClark <ma...@clarknet.cc> on 2007/10/13 19:26:20 UTC

No Page found for component in AjaxRequestTarget.detach()

Hi all,

I'm running into an issue, and have described the problem below.  Am I doing
something invalid?

* 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"

QUESTION:
I can't find anywhere where I explicitly add ComponentA to the request
target.  Is it implicitly added somewhere in the ajax request cycle because
it was the component which received the event?

QUESTION:
Is what I'm doing invalid?

Thanks,
Matt

-- 
View this message in context: http://www.nabble.com/No-Page-found-for-component-in-AjaxRequestTarget.detach%28%29-tf4618999.html#a13191716
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: No Page found for component in AjaxRequestTarget.detach()

Posted by Matej Knopp <ma...@gmail.com>.
Please create a jira issue, looks like a wicket bug to me.

-Matej

On 10/13/07, MattClark <ma...@clarknet.cc> wrote:
>
> Hi all,
>
> I'm running into an issue, and have described the problem below.  Am I doing
> something invalid?
>
> * 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"
>
> QUESTION:
> I can't find anywhere where I explicitly add ComponentA to the request
> target.  Is it implicitly added somewhere in the ajax request cycle because
> it was the component which received the event?
>
> QUESTION:
> Is what I'm doing invalid?
>
> Thanks,
> Matt
>
> --
> View this message in context: http://www.nabble.com/No-Page-found-for-component-in-AjaxRequestTarget.detach%28%29-tf4618999.html#a13191716
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org