if (tag.hasBehaviors())
{
Iterator<? extends Behavior> tagBehaviors = tag.getBehaviors();
while (tagBehaviors.hasNext())
{
final Behavior behavior = tagBehaviors.next();
if (behavior.isEnabled(this))
{
behavior.onComponentTag(this, tag);
}
behavior.detach(this);
}
}
// Apply behavior modifiers
List<? extends Behavior> behaviors = getBehaviors();
if ((behaviors != null) && !behaviors.isEmpty() && !tag.isClose() &&
(isIgnoreAttributeModifier() == false))
{
tag = tag.mutable();
for (Behavior behavior : behaviors)
{
// Components may reject some behavior components
if (isBehaviorAccepted(behavior))
{
behavior.onComponentTag(this, tag);
}
}
}
if ((tag instanceof WicketTag) && !tag.isClose() &&