use of de.metas.ui.web.window.descriptor.DocumentLayoutElementFieldDescriptor.LookupSource in project metasfresh-webui-api by metasfresh.
the class DescriptorsFactoryHelper method extractWidgetType.
public static DocumentFieldWidgetType extractWidgetType(final String columnName, final int displayType, final LookupDescriptor lookupDescriptor) {
final DocumentFieldWidgetType widgetType = extractWidgetType(columnName, displayType);
if (lookupDescriptor != null && (widgetType == DocumentFieldWidgetType.List || widgetType == DocumentFieldWidgetType.Lookup)) {
final LookupSource lookupSourceType = lookupDescriptor.getLookupSourceType();
final DocumentFieldWidgetType lookupWidgetType = extractWidgetType(lookupSourceType);
if (lookupWidgetType != widgetType) {
//
logger.warn(//
"Inconsistent '{}/{}'({}) vs '{}'({}). Considering the widgetType provided by lookupSourceType.", //
columnName, //
displayType, //
widgetType, lookupSourceType, lookupWidgetType);
}
return lookupWidgetType;
}
return widgetType;
}
Aggregations