if (repeat != null)
{
header.setRepeat(repeat.booleanValue());
}
final Band content = AutoGeneratorUtility.findGeneratedContent(header);
if (content == null)
{
return;
}
final Element headerLabelElement = new Element();
headerLabelElement.setElementType(new LabelType());
if (groupDefinition.getDisplayName() != null)
{
headerLabelElement.setAttribute
(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, groupDefinition.getDisplayName());
}
else
{
headerLabelElement.setAttribute
(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, groupDefinition.getField());
headerLabelElement.setAttribute
(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.LABEL_FOR, groupDefinition.getField());
headerLabelElement.setAttribute(AttributeNames.Wizard.NAMESPACE,
AttributeNames.Wizard.ALLOW_METADATA_ATTRIBUTES, Boolean.TRUE);
}
final Element headerValueElement =
AutoGeneratorUtility.generateDetailsElement(groupDefinition.getField(), computeElementType(groupDefinition));
headerValueElement.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.NULL_VALUE, "-");
final Band headerElement = new Band();
headerElement.getStyle().setStyleProperty(BandStyleKeys.LAYOUT, "inline");
headerElement.getStyle().setStyleProperty(ElementStyleKeys.MIN_WIDTH, new Float(-100));
headerElement.getStyle().setStyleProperty(ElementStyleKeys.DYNAMIC_HEIGHT, Boolean.TRUE);
headerElement.setAttribute(AttributeNames.Wizard.NAMESPACE,
AttributeNames.Wizard.ALLOW_METADATA_STYLING, Boolean.TRUE);
headerElement.setAttribute
(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.LABEL_FOR, groupDefinition.getField());
headerElement.setAttribute(AttributeNames.Wizard.NAMESPACE, "CachedWizardFormatData", headerDefinition);
headerElement.addElement(headerLabelElement);
headerElement.addElement(headerValueElement);
content.clear();
content.addElement(headerElement);
}
}