Nick Heudecker wrote:

Didn't work. So I have a Border component with the following markup:

<wicket:border>
<wicket:body/>
</wicket:border>

Then I have a Page with the following markup:

<span wicket:id="border">
<span wicket:id="eventSummaryPanel"/>
</span>

And the error is: "There must be exactly one <wicket:body> tag for

each

border compoment." Well, I have exactly one <wicket:body/> tag for

I just started learning wicket and one of the first things I ran into was that error message. My problem was that I had a border component like yours. In the page-java I tried to add the nested component to the page thus:

Page.html
<span wicket:id="border">
  <span wicket:id="message">
</span>

Page.java
  add(new MyBorder("border"));
  add(new Label("message", "the message")) ;

The problem is that the "message"-label does not belong to the page anymore. It belongs to the "border" so you have to add the message to the border and not the page. This is confusing for someone like myself that comes from tapestry where the same pattern works differently. The wicket error message is really confusing too.



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to