this.label.add(AttributeModifier.replace("for", ((ComponentWrapperPanel) component).getComponentOutputId()));
labelFor = true;
}
for (final Component comp : components) {
if (comp instanceof LabeledWebMarkupContainer) {
final LabeledWebMarkupContainer labeledComponent = (LabeledWebMarkupContainer) comp;
if (labeledComponent.getLabel() == null) {
labeledComponent.setLabel(new Model<String>(labelText));
}
} else if (component instanceof ComponentWrapperPanel) {
final FormComponent<?> formComponent = ((ComponentWrapperPanel)component).getFormComponent();
if (formComponent != null && formComponent.getLabel() == null) {
formComponent.setLabel(new Model<String>(labelText));