use of org.compiere.model.I_AD_UI_Column in project metasfresh-webui-api by metasfresh.
the class LayoutFactory method layoutSection.
/**
* Single row layout: section
*/
private DocumentLayoutSectionDescriptor.Builder layoutSection(final I_AD_UI_Section uiSection) {
final IModelTranslationMap uiSectionTrls = InterfaceWrapperHelper.getModelTranslationMap(uiSection);
final DocumentLayoutSectionDescriptor.Builder layoutSectionBuilder = DocumentLayoutSectionDescriptor.builder().setInternalName(uiSection.toString()).setCaption(uiSectionTrls.getColumnTrl(I_AD_UI_Section.COLUMNNAME_Name, uiSection.getName())).setDescription(uiSectionTrls.getColumnTrl(I_AD_UI_Section.COLUMNNAME_Description, uiSection.getDescription()));
if (!uiSection.isActive()) {
return layoutSectionBuilder.setInvalid("UI section not active: " + uiSection);
}
// UI Columns
for (final I_AD_UI_Column uiColumn : getUIProvider().getUIColumns(uiSection)) {
final DocumentLayoutColumnDescriptor.Builder layoutColumnBuilder = layoutColumn(uiColumn);
if (layoutColumnBuilder == null) {
continue;
}
layoutSectionBuilder.addColumn(layoutColumnBuilder);
}
return layoutSectionBuilder;
}
Aggregations