Thanks for the reply Igor! I’ll try
the methods you mentioned. You also said markup inheritance is a better fit
for this use case, could demonstrate how you would do this? I thought I was
using markup inheritance, but it appears I don’t fully understand how to
set it up correctly. Thanks! -Jerry From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor Vaynberg if you look at the
hierarchy of your message label it is like this: On 5/19/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 |
- Re: [Wicket-user] Border and markup inheritance problem Igor Vaynberg
- RE: [Wicket-user] Border and markup inheritance problem Jerry Smith
- Re: [Wicket-user] Border and markup inheritance pro... Igor Vaynberg
- Re: [Wicket-user] Border and markup inheritance problem karthik Guru