Well, is actually correct.

Let me draw your component tree for you:

Page
- Border "border"
-- Label "l"
- Label "l"

So thus, did you add the "l" label to the Page?

If not, shouldn't the markup error rise?
If you would have defined a wicket:id="l" in the Page's HTML then you'd get
a missing component by ID 'l".

At least if I remember how those 2 exception work. I haven't gotten them in
a while since we have tools in our IDEs to ensure that Java's and HTML's
component tree match. See the Eclipse market place or IntelliJ IDEA's
plugin market places and search for "Wicket" :)


On Tue, Jan 7, 2014 at 3:55 PM, Thies Edeling <tedel...@gmail.com> wrote:

> Hi
>
> With 6.12.0 I have:
>
> val border = new Border("border")
> val l = new Label("l", "label")
> l.setOutputMarkupId(true)
> border.add(l)
>
> and when handling an ajax call, I'm add/replacing it in the wrong spot in
> the hierarchy:
>
> val replacement = new Label("l", "labe2l")
> replacement.setOutputMarkupId(true)
> addOrReplace(replacement)
> target.add(replacement)
>
> Wicket gives me a MarkupNotFoundException which is a little odd and least
> put me in the complete wrong direction. It doesn't seem like the correct
> exception, right?
>
> org.apache.wicket.markup.MarkupNotFoundException: Markup not found for
> Component: [Component id = l]
> at org.apache.wicket.Component.internalRender(Component.java:2347)
> at org.apache.wicket.Component.render(Component.java:2307)
>
>
> gr,
> Thies
>

Reply via email to