Component component;
if (getLabelImage() == null) {
component = new Label(wicketId, getLabel());
}
else {
component = new ImageLabel(wicketId, getBeanMetaData().getComponent().getClass(), getLabelImage(), getLabel());
}
if (isRequired()) {
component.add( new AttributeAppender("class", new Model<String>(CSS_REQUIRED_FIELD_CLASS), " ") );
}