is there a test case that fails? (the result should be not rendered but it
does render a bit?)

then i can look into it a bit more, i haven't seen much of the transparent
resolver code.

But are you saying that somebody is setting the transparent resolver to none
visible?
And what component is then inserted to be rerendered for the ajax request?

Why does isVisibleInHierarchy not work? The transparent resolver is still a
parent right?

johan


On 10/24/07, Gerolf Seitz <[EMAIL PROTECTED]> wrote:
>
> the transparent resolver is set to non visible in the onClick handler of
> an
> AjaxButton.
> ParentResolver is not involved at all.
>
> the problem is, that the transparent resolver is not found in the
> hierarchy
> of the button,
> and thus it's not possible to use Component#isVisibleInHierarchy in
> Component.java:2245
>
> changing the code you mentioned (rather in MarkupContainer than in
> ParentResolver) doesn't help at all,
> because this code is in renderComponentTagBody, which is called in
> MarkupContainer#onComponentTagBody.
> BUT, MarkupContainer#onComponentTagBody is not called, because the
> transparent is not visible (check in Component.java:2245).
>
> tbh, i'm out of ideas on this one :(
>
>
> On 10/24/07, Johan Compagner <[EMAIL PROTECTED]> wrote:
> >
> > When do you set a transparent resolver to none visible?
> > I also think if 1 parent (transparent resolver or not) is invisible then
> > the
> > childs shouldn't be rendered.
> >
> > Because why else would you set it to not visible?
> >
> > But i haven't looked deeply into the resolver stuff But isn't it fixable
> > here:
> >
> >
> > MarkupContainer parent = container;
> > while ((parent != null) && (parent.isTransparentResolver()))
> > {
> > // Try to find the component with the parent component.
> > parent = parent.getParent();
> > if (parent != null)
> > {
> > Component component = parent.get(tag.getId());
> > if (component != null)
> > {
> > component.render (markupStream);
> > return true;
> > }
> > }
> > }
> > in the ParentResolver class?
> > So an extra check in that loop if the parent is visible?
> >
> > johan
> >
> >
> >
> >
> >
> > On 10/23/07, Gerolf Seitz < [EMAIL PROTECTED]> wrote:
> > >
> > > anybody with more insight into transparentResolvers (matej, igor?):
> > >
> > > what is the desired behavior for invisible transparentResolvers?
> > > it's really undefined right now, as the resolver is not rendered, but
> > the
> > > "children" _are_ (though without markup).
> > >
> > > if "children" of an invisible transparentResolver should be rendered,
> i
> > > may
> > > have an easy fix for this in Component#render(MarkupStream):
> > > instead of
> > > if (isRenderAllowed() && isVisible()) ....
> > > we could do
> > > if (isRenderAllowed() &&
> > >                (isVisible() || (this instanceof MarkupContainer &&
> > > ((MarkupContainer)this).isTransparentResolver())))
> > >
> > > nevertheless i think that the expected behavior of setting a
> > > transparentResolver to invisible is that it's "children" are not
> > rendered.
> >
> >
> >
> > Gerolf
> > >
> > > On 10/23/07, Gerolf Seitz (JIRA) <[EMAIL PROTECTED]> wrote:
> > > >
> > > > invisible TransparentResolver skips markup of visible children and
> > thus
> > > > resulting in an exception in Page#checkRendering (component not
> found
> > in
> > > > markup)
> > > >
> > > >
> > >
> >
> --------------------------------------------------------------------------------------------------------------------------------------------------------
> >
> > > >
> > > >                  Key: WICKET-1095
> > > >                  URL:
> > https://issues.apache.org/jira/browse/WICKET-1095
> > > >              Project: Wicket
> > > >           Issue Type: Bug
> > > >     Affects Versions: 1.3.0-beta4
> > > >             Reporter: Gerolf Seitz
> > > >              Fix For: 1.3.0-beta5
> > > >
> > > >
> > > > the code involved can be found at
> > > > http://papernapkin.org/pastebin/view/13287
> > > >
> > > > if a transparent (= isTransparentResolver() {return true;})
> > > > markupContainer is set to invisible, the component's markup is
> skipped
> > (
> > > > markupStream.skipComponent() in Component.java line 2319).
> > > > if the parent containing the transparent markupContainer is added to
> > the
> > > > ajax request target and there is a component (in this case a button)
> > > > "inside" the transparent markupcontainer's markup but is actually a
> > > child of
> > > > the transparent markupcontainer's parent, the button is never
> actually
> > > > rendered (due to skipping the markup of the transparent
> > > webmarkupcontainer)
> > > > but is still visibleInHierarchy (see Page.java line 1005), because
> the
> > > > invisible transparent markupcontainer is not a parent of the button.
> > > >
> > > > the ultimate question is: what is the desired behavior for an
> > invisible
> > > > transparentResolver? render it's "children" or not?
> > > >
> > > > --
> > > > 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