>From the stack trace you can see that the EnclosureResolver calls
autoAdd which proceeds to do a render and eventually call
getChildComponent - which obviously fails.

It would seem like there needs to be some call to a resolver invoked for
the newly created Enclosure object itself to give it a chance to
resolve/create it any child components found in the markup first,
because a call is made to getChildComponent which assumes the child is
there already - and so crashes.

> Subject: RE: Creating a panel inside an enclosure via an
> IComponentResolver
> 
> > Do you consider to use jsp for this project? They do the entire
> servlet
> > based on the tag name.(just kidding)
> 
> I've done my time in the jsp concentration camp - no more please! =)
> 
> > Make sure of remove the old standard EnclosureResolver and add your
> new
> > one on:
> 
> Yes, I've done that. I've made my own extended EnclosureResolver
> instance and replace the one that's in the mutable IComponentResolvers
> list.
> 
> My resolver is getting called for the creation of the Enclosure - as
> it's an enclosure I pass it on to the base class EnclosureResolver to
> create but it immediately proceeds to find the child panel without
ever
> calling any other component resolver to give them a change to create
and
> add that child.
> 
> 
> TRACE - ComponentLibraryResolver   - resolve: wicket tag so returning:
> <pb:enclosure child="menuPanel"> in [MarkupContainer [Component id =
> _extend2]]
> TRACE - CustomEnclosureResolver    - resolve: <pb:enclosure
> child="menuPanel">
> ERROR - RequestCycle               - Didn't find child component of
> <wicket:enclosure> with id='menuPanel'. Component: [MarkupContainer
> [Component id = enclosure-7]]
> org.apache.wicket.markup.MarkupException: Didn't find child component
of
> <wicket:enclosure> with id='menuPanel'. Component: [MarkupContainer
> [Component id = enclosure-7]]
>         at
>
org.apache.wicket.markup.html.internal.Enclosure.getChildComponent(Enclo
> sure.java:134)
>         at
>
org.apache.wicket.markup.html.internal.Enclosure.onComponentTagBody(Encl
> osure.java:183)
>         at
> org.apache.wicket.Component.renderComponent(Component.java:2626)
>         at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1536)
>         at org.apache.wicket.Component.render(Component.java:2457)
>         at
> org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
>         at
>
org.apache.wicket.markup.resolver.EnclosureResolver.resolve(EnclosureRes
> olver.java:61)
>         at
>
com.sas.av.ui.wicket.templates.original.CustomEnclosureResolver.resolve(
> CustomEnclosureResolver.java:78)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org


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

Reply via email to