*/
@Override
protected MultiLineLabel newLabel(final MarkupContainer parent, final String componentId,
final IModel<T> model)
{
MultiLineLabel label = new MultiLineLabel(componentId, model)
{
private static final long serialVersionUID = 1L;
/**
* {@inheritDoc}
*/
@Override
public void onComponentTagBody(final MarkupStream markupStream,
final ComponentTag openTag)
{
Object modelObject = getDefaultModelObject();
if ((modelObject == null) || "".equals(modelObject))
{
replaceComponentTagBody(markupStream, openTag, defaultNullLabel());
}
else
{
super.onComponentTagBody(markupStream, openTag);
}
}
};
label.setOutputMarkupId(true);
label.add(new LabelAjaxBehavior(getLabelAjaxEvent()));
return label;
}