Search in sources :

Example 31 with DocumentEntityDescriptor

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();
}
Also used : IMsgBL(de.metas.i18n.IMsgBL) DocumentEntityDescriptor(de.metas.ui.web.window.descriptor.DocumentEntityDescriptor)

Example 32 with DocumentEntityDescriptor

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);
}
Also used : QuickInputLayoutDescriptor(de.metas.ui.web.quickinput.QuickInputLayoutDescriptor) DocumentEntityDescriptor(de.metas.ui.web.window.descriptor.DocumentEntityDescriptor)

Example 33 with DocumentEntityDescriptor

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);
}
Also used : QuickInputLayoutDescriptor(de.metas.ui.web.quickinput.QuickInputLayoutDescriptor) DocumentEntityDescriptor(de.metas.ui.web.window.descriptor.DocumentEntityDescriptor)

Aggregations

DocumentEntityDescriptor (de.metas.ui.web.window.descriptor.DocumentEntityDescriptor)33 DocumentPath (de.metas.ui.web.window.datatypes.DocumentPath)9 WindowId (de.metas.ui.web.window.datatypes.WindowId)8 DocumentId (de.metas.ui.web.window.datatypes.DocumentId)7 ArrayList (java.util.ArrayList)5 NonNull (lombok.NonNull)5 AdempiereException (org.adempiere.exceptions.AdempiereException)5 Services (org.adempiere.util.Services)5 ImmutableList (com.google.common.collect.ImmutableList)4 IMsgBL (de.metas.i18n.IMsgBL)4 ProcessId (de.metas.ui.web.process.ProcessId)4 QuickInputLayoutDescriptor (de.metas.ui.web.quickinput.QuickInputLayoutDescriptor)4 ViewId (de.metas.ui.web.view.ViewId)4 SqlDocumentEntityDataBindingDescriptor (de.metas.ui.web.window.descriptor.sql.SqlDocumentEntityDataBindingDescriptor)4 Document (de.metas.ui.web.window.model.Document)4 List (java.util.List)4 Env (org.compiere.util.Env)4 ITranslatableString (de.metas.i18n.ITranslatableString)3 SourceDocument (de.metas.letters.model.MADBoilerPlate.SourceDocument)3 EntityNotFoundException (de.metas.ui.web.exceptions.EntityNotFoundException)3