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