use of org.adempiere.mm.attributes.spi.IAttributeValuesProvider in project metasfresh-webui-api by metasfresh.
the class HUEditorRowAttributesHelper method extractValueAndResolve.
private static final Object extractValueAndResolve(final IAttributeStorage attributesStorage, final IAttributeValue attributeValue) {
final Object value = attributeValue.getValue();
if (!attributeValue.isList()) {
return value;
}
final IAttributeValuesProvider valuesProvider = attributeValue.getAttributeValuesProvider();
final Evaluatee evalCtx = valuesProvider.prepareContext(attributesStorage);
final NamePair valueNP = valuesProvider.getAttributeValueOrNull(evalCtx, value);
return LookupValue.fromNamePair(valueNP);
}
Aggregations