if (StringUtils.isEmpty(field.getField()))
{
return;
}
final Element detailElement =
AutoGeneratorUtility.generateDetailsElement(field.getField(), computeElementType(field));
setupDefaultGrid(itemBand, detailElement);
final String id = "wizard::details-" + field.getField();
detailElement.setName(id);
detailElement.getStyle().setStyleProperty(ElementStyleKeys.MIN_WIDTH, new Float(width));
if (Boolean.TRUE.equals
(detailElement.getAttribute(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.ALLOW_METADATA_STYLING)))
{
detailElement.setAttribute(AttributeNames.Wizard.NAMESPACE, "CachedWizardFormatData", field);
}
if (Boolean.TRUE.equals
(detailElement.getAttribute(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.ALLOW_METADATA_ATTRIBUTES)))
{
detailElement.setAttribute(AttributeNames.Wizard.NAMESPACE, "CachedWizardFieldData", field);
}
itemBand.addElement(detailElement);
if (Boolean.TRUE.equals(field.getOnlyShowChangingValues()))
{
detailElement.setAttribute
(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.ONLY_SHOW_CHANGING_VALUES, Boolean.TRUE);
}
if (detailsHeader != null)
{
final Element headerElement = AutoGeneratorUtility.generateHeaderElement(field.getField());
setupDefaultGrid(detailsHeader, headerElement);
headerElement.getStyle().setStyleProperty(ElementStyleKeys.MIN_WIDTH, new Float(width));
if (Boolean.TRUE.equals
(headerElement.getAttribute(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.ALLOW_METADATA_STYLING)))
{
headerElement.setAttribute(AttributeNames.Wizard.NAMESPACE, "CachedWizardFormatData", field);
}
if (Boolean.TRUE.equals
(headerElement.getAttribute(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.ALLOW_METADATA_ATTRIBUTES)))
{
headerElement.setAttribute(AttributeNames.Wizard.NAMESPACE, "CachedWizardFieldData", field);
}
headerElement.setAttribute(AttributeNames.Wizard.NAMESPACE,
MetaAttributeNames.Style.HORIZONTAL_ALIGNMENT, field.getHorizontalAlignment());
detailsHeader.addElement(headerElement);
}
if (detailsFooter != null)
{
final Class aggFunctionClass = field.getAggregationFunction();
final Element footerElement = AutoGeneratorUtility.generateFooterElement
(aggFunctionClass, computeElementType(field), null, field.getField());
setupDefaultGrid(detailsFooter, footerElement);
footerElement.getStyle().setStyleProperty(ElementStyleKeys.MIN_WIDTH, new Float(width));
if (Boolean.TRUE.equals
(footerElement.getAttribute(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.ALLOW_METADATA_STYLING)))
{
footerElement.setAttribute(AttributeNames.Wizard.NAMESPACE, "CachedWizardFormatData", field);
}
if (Boolean.TRUE.equals
(footerElement.getAttribute(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.ALLOW_METADATA_ATTRIBUTES)))
{
footerElement.setAttribute(AttributeNames.Wizard.NAMESPACE, "CachedWizardFieldData", field);
}
detailsFooter.addElement(footerElement);
}
}