1. you are repeating the UL tag instead of the LI tag. You should use
<li wicket:id="menu">, but I'd recommend to rename the component to
menuitem to make it more clear
2. you don't have child components defined in the markup for each
element. This is necessary.
<ul>
<li wicket:id="menu"><a href="#" wicket:id="link"><span
wicket:id="label"></span></a></li>
</ul>
and in your populateItem:
link = new BookmarkablePageLink("link", ...);
item.add(link);
link.add(new Label("label", ....));
Martijn
On Fri, Aug 22, 2008 at 11:01 AM, btakacs <[EMAIL PROTECTED]> wrote:
>
> I have just tried to change the markup to:
>
> <ul>
> <wicket:container wicket:id = "menu"> <li> </li></wicket:container>
> </ul>
>
>
> but it has the same result.
>
> And then I tried to remove that element from the markup:
>
>
> <ul>
> <wicket:container wicket:id = "menu"> <li> something
> </li></wicket:container>
> </ul>
>
>
> ... and the framework missed it:
>
>
> org.apache.wicket.WicketRuntimeException: The component(s) below failed to
> render. A common problem is that you have added a component in code but
> forgot to reference it in the markup (thus the component will never be
> rendered).
>
> 1. [Component id = label, page = com.myapp.wicket.HomePage, path =
> 0:mainNavigation:menu:0:label.Label, isVisible = true, isVersioned = true]
> 2. [Component id = label, page = com.myapp.wicket.HomePage, path =
> 0:mainNavigation:menu:1:label.Label, isVisible = true, isVersioned = true]
> 3. [Component id = label, page = com.myapp.wicket.HomePage, path =
> 0:mainNavigation:menu:2:label.Label, isVisible = true, isVersioned = true]
>
> at org.apache.wicket.Page.checkRendering(Page.java:1116)
> at org.apache.wicket.Page.renderPage(Page.java:914)
>
>
> any tips?
> --
> View this message in context:
> http://www.nabble.com/%22Unable-to-find-component-with-id%22-tp19091781p19103768.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]