I suppose one way around it would be to override Enclosure and create a
DynamicEnclosure that supports the child components being resolved
dynamically by a resolver. I then make my CustomEnclosureResolver return
a DynamicEnclosure instead of a standard Enclosure.
I guess to do that I'd need to override Enclosure.getChildComponent and
put a hook in somewhere to call a resolver to populate the children
before it peforms the line parent.get(childId.toString())
public Component< ? > getChildComponent()
{
if (childComponent == null)
{
MarkupContainer< ? > parent =
getEnclosureParent();
if (childId == null)
{
throw new MarkupException(
"You most likely forgot to
register the EnclosureHandler with the MarkupParserFactory");
}
final Component< ? > child =
parent.get(childId.toString());
if (child == null)
{
throw new MarkupException(
"Didn't find child component of
<wicket:enclosure> with id='" + childId +
"'. Component: " +
this.toString());
}
childComponent = child;
}
return childComponent;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]