can you try : public class BasePage extends WebPage {
public BasePage() { add(new MyBorder("border").setTransparentResolver(true) ); } } The problem is that the message component should have been added to the Border component in the base page. But then that would mean an unnecessary dependency on the Border being present in the Base page. Calling the above method should allow you to add the "message" directly to the page. On 5/20/06, Jerry Smith <[EMAIL PROTECTED]> wrote:
Sorry to send this again, I know you're all very busy trying to get the 1.2 release together, but I didn't want this to fall through the cracks if it is a bug. I'm get a "WicketMessage: Unable to find component with id 'message'" error. Maybe this can't be done or I'm doing it wrong using 1.2rc4, but what I'm working with is a MyBorder component, a BasePage, and ExtendPage. Here's the distilled code bits: MyBorder.html: <wicket:border> <div wicket:id="header">[header]</div> <div> <wicket:body/> </div> <div wicket:id="footer">[footer]</div> </wicket:border> MyBorder.java: public class MyBorder extends Border { public MyBorder(String id) { super(id); add(new Label("header", new Model("Border Header"))); add(new Label("footer", new Model("Border Footer"))); } } BasePage.html <html> <body> <div wicket:id="border"> <wicket:child/> </div> </body> </html> BasePage.java public class BasePage extends WebPage { public BasePage() { add(new MyBorder("border")); } } ExtendPage.html: <wicket:extend> <span wicket:id="message">[message]</span> </wicket:extend> ExtendPage.java: public class ExtendPage extends BasePage { public ExtendPage() { super(); add(new Label("message", new Model("Extended message"))); } } Here's the error output minus stack: <html> <head> <title></title> </head> <body> <div wicket:id="border"> <wicket:child><wicket:extend> <span wicket:id="message">[message]</span> </wicket:extend></wicket:child> </div> </body> </html> [Page class = ExtendPage, id = 4]: # Path Size Type Model Object 1 _<body> 2.7K wicket.markup.html.internal.HtmlBodyContainer 2 _header 473 bytes wicket.markup.html.internal.HtmlHeaderContainer 3 border 1.3K com.ses.wicket.components.test.x.MyBorder 4 border:_child 485 bytes wicket.markup.html.WebMarkupContainer 5 border:_child:_extend 456 bytes wicket.markup.html.WebMarkupContainer 6 border:footer 456 bytes wicket.markup.html.basic.Label Border Footer 7 border:header 456 bytes wicket.markup.html.basic.Label Border Header 8 message 460 bytes wicket.markup.html.basic.Label Extended message From this it looks like the "message" Label isn't being added to the correct component(border:_child:_extend?), am I doing something wrong, or is this a bug? Thanks for any input! -Jerry
-- -- karthik -- ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user