Thanks for the information ... I'll change our code.

Meetesh

Igor Vaynberg wrote:
i dont think we can support transparent resolvers as ajax targets

-igor


On Fri, Apr 11, 2008 at 10:00 AM, Meetesh Karia <[EMAIL PROTECTED]> wrote:
Hi all,

 We're seeing an issue with ajax and isTransparentResolver set to return
true and I'm wondering if this is something we're doing wrong or if it's an
oversight.  Here's an example:

 add(new WebMarkupContainer("toUpdate") {
   @Override
   public boolean isTransparentResolver() {
       return true;
   }
 });

 add(new WebMarkupContainer("myChild"));

 with html like this:

 <div wicket:id="toUpdate">
   <div wicket:id="myChild">
   ...
   </div>
 </div>

 When a user clicks on an ajax link (which is a "child" of toUpdate and
added in the same manner as myChild), toUpdate is added to the target to be
rendered.

 Now, because toUpdate doesn't have any real children, it doesn't mark any
of them as rendering in MarkupContainer.internalMarkRendering().  However,
Component.render(MarkupStream) does mark all of the children as rendering
because it calls markRendering() itself.  When the rendering is finished,
MarkupContainer.onAfterRenderChildren() is called but only the toUpdate
container has it's rendering flag set to false and the child rendering flags
remain set to true.  If there's now another ajax click within that same
container which modifies the visibility of a component, an exception will be
thrown indicating that a hierarchy change can't occur while rendering.

 Are we using isTransparentResolver() incorrectly?

 Thanks,
 Meetesh

Reply via email to