Description
I extended the AjaxDataTable to be able to add Rows to certain states of the rows. However, MarkupFragmentFinder fails to resolve the code under this condition since it compares with the wrong components in this case:
Markup:
<wicket:container wicket:id="rows">
<tr wicket:id="row"><td wicket:id="cells"><span wicket:id="cell">[cell]</span></td></tr>
<tr wicket:id="action-row" class="actionRow"></tr>
</wicket:container>
'row' is the transparent resolver in this case to maintain the hierarchy needed by the DataTable. MarkupFragmentFinder fails in the case of adding a cell to an AjaxRequestTarget.
Fix:
Everything works as expected, when MarkupFragmentFinder checks for the parent being an AbstractRepeater and in the case compares the parent.id with the supplied id (code provided by Gerolf):
if (elem instanceof ComponentTag)
{
ComponentTag tag = (ComponentTag)elem;
String id = tag.getId();
if ((id != null) && id.equals(component.getId()))
else
{
Component parent = component.getParent();
if (parent instanceof AbstractRepeater && id != null && id.equals(parent.getId()))
}
}