You don't add the child to the right component: you have wrapped the <child/> tag inside a markup container. You have to make the markup container a transparent resolver, *or* add the child components to the markup container.
Martijn On Fri, Apr 3, 2009 at 7:47 AM, Ryan McKinley <ryan...@gmail.com> wrote: > I have been using markup inheritance for page layout for a while without any > issue. > > I just tried to use it for a Panel and am running into some issues -- I > imagine it is user error, so i figured I would ask here before banging my > head much longer. > > I have two classes: > > > SimpleRow.java > public class SimpleRow extends Panel > { > public SimpleRow(String id ) > { > ... > } > } > > SimpleRow.html > <table> > <wicket:panel> > > <tr valign="top"> > <td width="60"> > <img wicket:id="img" src="img/explore.gif" /> > </td> > <td wicket:id="td" valign="top"> > <h2 wicket:id="title">Title</h2> > <wicket:child/> > </td> > </tr> > > </wicket:panel> > </table> > > - - - - - - - - - - > > Then I want a subclass to fill in content for <wicket:child/> > > ExportRow.java > public class ExportRow extends SimpleRow > { > public ExportRow(String id) > { > super( id ); > > add( new Label( "test", "hello" ) ); > } > } > > ExportRow.html > <wicket:extend> > Here is some text <span wicket:id="test">xxx</span> > </wicket:extend> > > - - - - - - - > > With this, I get an errror: > Unable to find component with id 'test' in [MarkupContainer [Component id = > _extend8]] ... > > If I do not try to add any components in the subclass, things behave as I > would expect. > > Am I missing something? > > Thanks > ryan > > > -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org