use of de.metas.ui.web.window.descriptor.DocumentEntityDescriptor in project metasfresh-webui-api by metasfresh.
the class EmptiesQuickInputDescriptorFactory method createEntityDescriptor.
private DocumentEntityDescriptor createEntityDescriptor(final DocumentId documentTypeId, final DetailId detailId, @NonNull final Optional<Boolean> soTrx) {
final IMsgBL msgBL = Services.get(IMsgBL.class);
final DocumentEntityDescriptor.Builder entityDescriptor = DocumentEntityDescriptor.builder().setDocumentType(DocumentType.QuickInput, documentTypeId).setIsSOTrx(soTrx).disableDefaultTableCallouts().setDataBinding(DocumentEntityDataBindingDescriptorBuilder.NULL).setDetailId(detailId);
entityDescriptor.addField(DocumentFieldDescriptor.builder(IEmptiesQuickInput.COLUMNNAME_M_HU_PackingMaterial_ID).setCaption(msgBL.translatable(IEmptiesQuickInput.COLUMNNAME_M_HU_PackingMaterial_ID)).setWidgetType(DocumentFieldWidgetType.Lookup).setLookupDescriptorProvider(SqlLookupDescriptor.builder().setCtxTableName(// ctxTableName
null).setCtxColumnName(IEmptiesQuickInput.COLUMNNAME_M_HU_PackingMaterial_ID).setDisplayType(DisplayType.Search).buildProvider()).setValueClass(IntegerLookupValue.class).setReadonlyLogic(ConstantLogicExpression.FALSE).setAlwaysUpdateable(true).setMandatoryLogic(ConstantLogicExpression.TRUE).setDisplayLogic(ConstantLogicExpression.TRUE).addCharacteristic(Characteristic.PublicField));
entityDescriptor.addField(DocumentFieldDescriptor.builder(IEmptiesQuickInput.COLUMNNAME_Qty).setCaption(msgBL.translatable(IEmptiesQuickInput.COLUMNNAME_Qty)).setWidgetType(DocumentFieldWidgetType.Integer).setReadonlyLogic(ConstantLogicExpression.FALSE).setAlwaysUpdateable(true).setMandatoryLogic(ConstantLogicExpression.TRUE).setDisplayLogic(ConstantLogicExpression.TRUE).addCharacteristic(Characteristic.PublicField));
return entityDescriptor.build();
}
use of de.metas.ui.web.window.descriptor.DocumentEntityDescriptor in project metasfresh-webui-api by metasfresh.
the class ForecastLineQuickInputDescriptorFactory method createQuickInputEntityDescriptor.
@Override
public QuickInputDescriptor createQuickInputEntityDescriptor(final DocumentType documentType, final DocumentId documentTypeId, final DetailId detailId, @NonNull final Optional<Boolean> soTrx) {
final DocumentEntityDescriptor entityDescriptor = createEntityDescriptor(documentTypeId, detailId, soTrx);
final QuickInputLayoutDescriptor layout = createLayout(entityDescriptor);
return QuickInputDescriptor.of(entityDescriptor, layout, ForecastLineQuickInputProcessor.class);
}
use of de.metas.ui.web.window.descriptor.DocumentEntityDescriptor in project metasfresh-webui-api by metasfresh.
the class OrderLineQuickInputDescriptorFactory method createQuickInputEntityDescriptor.
@Override
public QuickInputDescriptor createQuickInputEntityDescriptor(final DocumentType documentType, final DocumentId documentTypeId, final DetailId detailId, @NonNull final Optional<Boolean> soTrx) {
final DocumentEntityDescriptor entityDescriptor = createEntityDescriptor(documentType, documentTypeId, detailId, soTrx);
final QuickInputLayoutDescriptor layout = createLayout(entityDescriptor);
return QuickInputDescriptor.of(entityDescriptor, layout, OrderLineQuickInputProcessor.class);
}
Aggregations