You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Eelco Hillenius <ee...@gmail.com> on 2007/09/12 06:53:26 UTC

Re: Ajax operations on Panels nested in Fragments

On 8/29/07, Oli Evans <ol...@needleandthread.org> wrote:
> I just lost a few hours on a problem where an ajax operation on a Panel
> nested in a Fragment was failing as my nested panel could not find its
> associated markup. It seems this was because a Fragment will only
> reliably find its markup if you explicitly provide it with the Component
> that contains its markup in the Fragment constructor.
>
> If you don't, Fragment.getAssociatedMarkupStream() will find its
> markupProvider field is null, and so have to take a guess at where its
> markup might be. If your fragment usage happens to be as a direct child
> of the component that defines the fragment markup then it will all work
> out, but if you have nested it in something like a ListView then it will
> fail.
>
> ...So watch out kids, if you use fragments, use a constructor that tells
> it where its markup is. Would you like to have to guess who your real
> parents are? I think not.

More people have bumped their head against this issue (including me).
Igor deprecated the parent-less constructors.

Eelco

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