Search in sources :

Example 1 with Builder

use of de.metas.ui.web.window.descriptor.DocumentFieldDescriptor.Builder in project metasfresh-webui-api by metasfresh.

the class OrderLineQuickInputDescriptorFactory method createProductFieldBuilder.

private Builder createProductFieldBuilder(@NonNull final Optional<Boolean> soTrx) {
    final ProductLookupDescriptor productLookupDescriptor = createProductLookupDescriptor(soTrx);
    final ITranslatableString caption = Services.get(IMsgBL.class).translatable(IOrderLineQuickInput.COLUMNNAME_M_Product_ID);
    final Builder productFieldBuilder = DocumentFieldDescriptor.builder(IOrderLineQuickInput.COLUMNNAME_M_Product_ID).setLookupDescriptorProvider(productLookupDescriptor).setCaption(caption).setWidgetType(DocumentFieldWidgetType.Lookup).setReadonlyLogic(ConstantLogicExpression.FALSE).setAlwaysUpdateable(true).setMandatoryLogic(ConstantLogicExpression.TRUE).setDisplayLogic(ConstantLogicExpression.TRUE).addCallout(OrderLineQuickInputDescriptorFactory::onProductChangedCallout).addCharacteristic(Characteristic.PublicField);
    return productFieldBuilder;
}
Also used : ProductLookupDescriptor(de.metas.ui.web.window.descriptor.sql.ProductLookupDescriptor) IMsgBL(de.metas.i18n.IMsgBL) Builder(de.metas.ui.web.window.descriptor.DocumentFieldDescriptor.Builder) ITranslatableString(de.metas.i18n.ITranslatableString)

Aggregations

IMsgBL (de.metas.i18n.IMsgBL)1 ITranslatableString (de.metas.i18n.ITranslatableString)1 Builder (de.metas.ui.web.window.descriptor.DocumentFieldDescriptor.Builder)1 ProductLookupDescriptor (de.metas.ui.web.window.descriptor.sql.ProductLookupDescriptor)1