You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Kees de Kooter <kd...@gmail.com> on 2007/08/28 20:53:01 UTC
hierarchy does not match
I have a (superclass) page with a couple of panels and a wicket:child
tag. When I try to open a child page I get the following error
message:
"WicketMessage: Unable to find component with id 'customers' [..] This
means that you declared wicket:id=customers in your markup, but that
you either did not add the component to your page at all, or that the
hierarchy does not match."
Now the 'customers' object is present in the page, as can be seen at
the bottom of the exception page, so I assume that the 'hierarchy does
not match':
13 menuPanel:customers 1.4K
org.apache.wicket.markup.html.basic.Label Customers
The problem is in the first panel in the page, the following tag in
that page is highlighted in the error message:
<span wicket:id="customers">customers</span>
The error started occurring after moving to Wicket 1.3.0-beta2.
Am I missing something?? How can I make the hierarchy match?
--
Cheers,
Kees de Kooter
http://www.boplicity.net
Re: hierarchy does not match
Posted by Igor Vaynberg <ig...@gmail.com>.
your hierarchy was fine
the problem was that wicket was inserting a webmarkup container
automatically - but was not making it transparent so it was messing up the
hierarchy.
-igor
On 8/30/07, Kees de Kooter <kd...@gmail.com> wrote:
>
> Thanks a lot Igor,
>
> With the trunk snapshot it is working. Does this mean that a
> not-matching-hierarchy is not a problem after all? Or should I fix my
> hierarchy anyway?
>
> -Kees
>
> On 8/30/07, Igor Vaynberg <ig...@gmail.com> wrote:
> > hi kees, i believe i just checked in a fix for this into trunk, mind
> giving
> > it a go?
> >
> > the error means that the hierarchy between html and java is not in sync
> >
> > for example
> >
> >
> > webmarkupcontainer foo=new webmarkupcontainer();
> > foo.add(new label("bar"));
> >
> > <div wicket:id="foo"></div><div wicket:id="bar"></div>
> >
> > as you can see the hierarchies are not in sync, html should be
> >
> > <div wicket:id="foo"><div wicket:id="bar"></div></div>
> >
> > -igor
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: hierarchy does not match
Posted by Kees de Kooter <kd...@gmail.com>.
Thanks a lot Igor,
With the trunk snapshot it is working. Does this mean that a
not-matching-hierarchy is not a problem after all? Or should I fix my
hierarchy anyway?
-Kees
On 8/30/07, Igor Vaynberg <ig...@gmail.com> wrote:
> hi kees, i believe i just checked in a fix for this into trunk, mind giving
> it a go?
>
> the error means that the hierarchy between html and java is not in sync
>
> for example
>
>
> webmarkupcontainer foo=new webmarkupcontainer();
> foo.add(new label("bar"));
>
> <div wicket:id="foo"></div><div wicket:id="bar"></div>
>
> as you can see the hierarchies are not in sync, html should be
>
> <div wicket:id="foo"><div wicket:id="bar"></div></div>
>
> -igor
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: hierarchy does not match
Posted by Igor Vaynberg <ig...@gmail.com>.
hi kees, i believe i just checked in a fix for this into trunk, mind giving
it a go?
the error means that the hierarchy between html and java is not in sync
for example
webmarkupcontainer foo=new webmarkupcontainer();
foo.add(new label("bar"));
<div wicket:id="foo"></div><div wicket:id="bar"></div>
as you can see the hierarchies are not in sync, html should be
<div wicket:id="foo"><div wicket:id="bar"></div></div>
-igor
On 8/30/07, Kees de Kooter <kd...@gmail.com> wrote:
>
> Still stuck with the same exception, even after upgrading to beta3.
> Can you please explain what "hierarchy does not match" means?
>
> On 8/28/07, Kees de Kooter <kd...@gmail.com> wrote:
> > > The Apache mailing lists don't allow attachments, so that got
> > > filtered. Furthermore, a relevant piece of code usually helps us
> > > better see what the problem might be. In your code both java code and
> > > some of your markup.
> > >
> >
> > OK, here are some snippets:
> >
> > My superclass:
> >
> > public abstract class TemplateWebPage extends WebPage {
> >
> > public TemplateWebPage() {
> > super();
> > add(new Label("pageTitle", new PropertyModel(this,
> "pageTitle")));
> > add(new MenuPanel("menuPanel"));
> > add(new UserPanel("userPanel"));
> > }
> >
> > The main markup of that page:
> >
> > <div class="left-column" wicket:id="menuPanel">
> > </div>
> >
> > <div class="right-column">
> > <wicket:child/>
> > </div>
> >
> > The code of the "MenuPanel":
> >
> > public class MenuPanel extends Panel {
> >
> > public MenuPanel(String id) {
> > super(id);
> >
> > add(new Label("customers", getString("
> menu.main.customers")));
> >
> >
> > The markup of the panel:
> >
> > <wicket:panel xmlns:wicket="http://wicket.sourceforge.net/">
> >
> > <div class="menu" style="width: 158px;">
> > <table style="width: 100%;">
> > <tr class="menuitem">
> > <td colspan="2" style="width: 160px;">
> > <a href="company-list.do?relation-type=customer">
> > <span wicket:id="customers">customers</span>
> > </a>
> > </td>
> > </tr>
> >
> > The first lines of the exception:
> >
> > Unexpected RuntimeException
> >
> > WicketMessage: Unable to find component with id 'customers' in
> > [MarkupContainer [Component id = -relative_path_prefix10, page =
> > nl.boplicity.metronome.wicket.location.LocationListPage, path =
> > 11:menuPanel:-relative_path_prefix10.WebMarkupContainer, isVisible =
> > true, isVersioned = true]]. This means that you declared
> > wicket:id=customers in your markup, but that you either did not add
> > the component to your page at all, or that the hierarchy does not
> > match.
> > [markup =
> file:/home/kees/eclipse-workspace/metronome/target/classes/nl/boplicity/metronome/wicket/menu/MenuPanel.html
> >
>
>
> --
> Cheers,
> Kees de Kooter
> http://www.boplicity.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: hierarchy does not match
Posted by Kees de Kooter <kd...@gmail.com>.
Still stuck with the same exception, even after upgrading to beta3.
Can you please explain what "hierarchy does not match" means?
On 8/28/07, Kees de Kooter <kd...@gmail.com> wrote:
> > The Apache mailing lists don't allow attachments, so that got
> > filtered. Furthermore, a relevant piece of code usually helps us
> > better see what the problem might be. In your code both java code and
> > some of your markup.
> >
>
> OK, here are some snippets:
>
> My superclass:
>
> public abstract class TemplateWebPage extends WebPage {
>
> public TemplateWebPage() {
> super();
> add(new Label("pageTitle", new PropertyModel(this, "pageTitle")));
> add(new MenuPanel("menuPanel"));
> add(new UserPanel("userPanel"));
> }
>
> The main markup of that page:
>
> <div class="left-column" wicket:id="menuPanel">
> </div>
>
> <div class="right-column">
> <wicket:child/>
> </div>
>
> The code of the "MenuPanel":
>
> public class MenuPanel extends Panel {
>
> public MenuPanel(String id) {
> super(id);
>
> add(new Label("customers", getString("menu.main.customers")));
>
>
> The markup of the panel:
>
> <wicket:panel xmlns:wicket="http://wicket.sourceforge.net/">
>
> <div class="menu" style="width: 158px;">
> <table style="width: 100%;">
> <tr class="menuitem">
> <td colspan="2" style="width: 160px;">
> <a href="company-list.do?relation-type=customer">
> <span wicket:id="customers">customers</span>
> </a>
> </td>
> </tr>
>
> The first lines of the exception:
>
> Unexpected RuntimeException
>
> WicketMessage: Unable to find component with id 'customers' in
> [MarkupContainer [Component id = -relative_path_prefix10, page =
> nl.boplicity.metronome.wicket.location.LocationListPage, path =
> 11:menuPanel:-relative_path_prefix10.WebMarkupContainer, isVisible =
> true, isVersioned = true]]. This means that you declared
> wicket:id=customers in your markup, but that you either did not add
> the component to your page at all, or that the hierarchy does not
> match.
> [markup = file:/home/kees/eclipse-workspace/metronome/target/classes/nl/boplicity/metronome/wicket/menu/MenuPanel.html
>
--
Cheers,
Kees de Kooter
http://www.boplicity.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: hierarchy does not match
Posted by Kees de Kooter <kd...@gmail.com>.
> The Apache mailing lists don't allow attachments, so that got
> filtered. Furthermore, a relevant piece of code usually helps us
> better see what the problem might be. In your code both java code and
> some of your markup.
>
OK, here are some snippets:
My superclass:
public abstract class TemplateWebPage extends WebPage {
public TemplateWebPage() {
super();
add(new Label("pageTitle", new PropertyModel(this, "pageTitle")));
add(new MenuPanel("menuPanel"));
add(new UserPanel("userPanel"));
}
The main markup of that page:
<div class="left-column" wicket:id="menuPanel">
</div>
<div class="right-column">
<wicket:child/>
</div>
The code of the "MenuPanel":
public class MenuPanel extends Panel {
public MenuPanel(String id) {
super(id);
add(new Label("customers", getString("menu.main.customers")));
The markup of the panel:
<wicket:panel xmlns:wicket="http://wicket.sourceforge.net/">
<div class="menu" style="width: 158px;">
<table style="width: 100%;">
<tr class="menuitem">
<td colspan="2" style="width: 160px;">
<a href="company-list.do?relation-type=customer">
<span wicket:id="customers">customers</span>
</a>
</td>
</tr>
The first lines of the exception:
Unexpected RuntimeException
WicketMessage: Unable to find component with id 'customers' in
[MarkupContainer [Component id = -relative_path_prefix10, page =
nl.boplicity.metronome.wicket.location.LocationListPage, path =
11:menuPanel:-relative_path_prefix10.WebMarkupContainer, isVisible =
true, isVersioned = true]]. This means that you declared
wicket:id=customers in your markup, but that you either did not add
the component to your page at all, or that the hierarchy does not
match.
[markup = file:/home/kees/eclipse-workspace/metronome/target/classes/nl/boplicity/metronome/wicket/menu/MenuPanel.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: hierarchy does not match
Posted by Eelco Hillenius <ee...@gmail.com>.
On 8/28/07, Kees de Kooter <kd...@gmail.com> wrote:
> Hi Igor,
>
> What kind of information would you like to have? Source code?
>
> I did attach the entire exception page.
The Apache mailing lists don't allow attachments, so that got
filtered. Furthermore, a relevant piece of code usually helps us
better see what the problem might be. In your code both java code and
some of your markup.
Eelco
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: hierarchy does not match
Posted by Martijn Dashorst <ma...@gmail.com>.
The spam filters must have caught the attachment. You can use a pastebin though:
http://papernapkin.org/pastebin/home
Martijn
On 8/28/07, Kees de Kooter <kd...@gmail.com> wrote:
> Hi Igor,
>
> What kind of information would you like to have? Source code?
>
> I did attach the entire exception page.
>
> Kees
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
Wicket joins the Apache Software Foundation as Apache Wicket
Apache Wicket 1.3.0-beta2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: hierarchy does not match
Posted by Kees de Kooter <kd...@gmail.com>.
Hi Igor,
What kind of information would you like to have? Source code?
I did attach the entire exception page.
Kees
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: hierarchy does not match
Posted by Igor Vaynberg <ig...@gmail.com>.
On 8/28/07, Kees de Kooter <kd...@gmail.com> wrote:
>
> I have a (superclass) page with a couple of panels and a wicket:child
> tag. When I try to open a child page I get the following error
> message:
>
> "WicketMessage: Unable to find component with id 'customers' [..] This
> means that you declared wicket:id=customers in your markup, but that
> you either did not add the component to your page at all, or that the
> hierarchy does not match."
>
> Now the 'customers' object is present in the page, as can be seen at
> the bottom of the exception page, so I assume that the 'hierarchy does
> not match':
>
> 13 menuPanel:customers 1.4K
> org.apache.wicket.markup.html.basic.Label Customers
>
> The problem is in the first panel in the page, the following tag in
> that page is highlighted in the error message:
>
> <span wicket:id="customers">customers</span>
>
> The error started occurring after moving to Wicket 1.3.0-beta2.
>
> Am I missing something?? How can I make the hierarchy match?
you can start by providing us a little bit more to go on
-igor
--
> Cheers,
> Kees de Kooter
> http://www.boplicity.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>