org.hibernate.MappingException

@RoinujNosde

Conversor:

package br.com.fjsistemas.backend;

import java.util.List;
import java.util.Locale;

import org.springframework.core.convert.ConversionException;

import com.vaadin.flow.data.binder.Result;
import com.vaadin.flow.data.binder.ValueContext;
import com.vaadin.flow.data.converter.Converter;

public class StringToNameConverter implements Converter<String, List<String>> {

	private static final long serialVersionUID = 1L;

	public Class<Venda> getModelType() {
		return Venda.class;
	}

	public Class<String> getPresentationType() {
		return String.class;
	}

	@Override
	public Result<List<String>> convertToModel(String value, ValueContext context) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Result<String> convertToPresentation(List<String> value, ValueContext context) {
	    return Result.ok(value.toString());
	}

}
public String convertToPresentation(List<String> value, ValueContext context) {
    return value.toString();
}

@RoinujNosde

está dando este erro agora:

Todas as ligações criadas com forField devem ser concluídas antes de chamar setBean

stack:

java.lang.IllegalStateException: All bindings created with forField must be completed before calling setBean
	at com.vaadin.flow.data.binder.Binder.checkBindingsCompleted(Binder.java:2699) ~[flow-data-2.4.6.jar:2.4.6]
	at com.vaadin.flow.data.binder.Binder.setBean(Binder.java:1763) ~[flow-data-2.4.6.jar:2.4.6]
	at br.com.fjsistemas.compraVenda.VendaView.novoClick(VendaView.java:397) ~[classes/:na]
	at br.com.fjsistemas.compraVenda.VendaView.lambda$0(VendaView.java:158) ~[classes/:na]
	at com.vaadin.flow.component.ComponentEventBus.fireEventForListener(ComponentEventBus.java:205) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.component.ComponentEventBus.handleDomEvent(ComponentEventBus.java:373) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.component.ComponentEventBus.lambda$addDomTrigger$dd1b7957$1(ComponentEventBus.java:264) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.internal.nodefeature.ElementListenerMap.lambda$fireEvent$2(ElementListenerMap.java:441) ~[flow-server-2.4.6.jar:2.4.6]
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1507) ~[na:na]
	at com.vaadin.flow.internal.nodefeature.ElementListenerMap.fireEvent(ElementListenerMap.java:441) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.rpc.EventRpcHandler.handleNode(EventRpcHandler.java:59) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.rpc.AbstractRpcInvocationHandler.handle(AbstractRpcInvocationHandler.java:64) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.ServerRpcHandler.handleInvocationData(ServerRpcHandler.java:409) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.ServerRpcHandler.lambda$handleInvocations$1(ServerRpcHandler.java:390) ~[flow-server-2.4.6.jar:2.4.6]
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1507) ~[na:na]
	at com.vaadin.flow.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:390) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:317) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:89) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1547) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:247) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.spring.SpringServlet.service(SpringServlet.java:111) ~[vaadin-spring-12.3.2.jar:na]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:352) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.springframework.web.servlet.mvc.ServletForwardingController.handleRequestInternal(ServletForwardingController.java:141) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:177) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:52) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1060) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:652) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.3.jar:5.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.3.jar:5.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.3.jar:5.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at java.base/java.lang.Thread.run(Thread.java:830) ~[na:na]

Conversor:

package br.com.fjsistemas.backend;

import java.util.List;

import com.vaadin.flow.data.binder.Result;
import com.vaadin.flow.data.binder.ValueContext;
import com.vaadin.flow.data.converter.Converter;

public class StringToNameConverter implements Converter<String, List<String>> {

	private static final long serialVersionUID = 1L;

	public Class<Venda> getModelType() {
		return Venda.class;
	}

	public Class<String> getPresentationType() {
		return String.class;
	}

	@Override
	public Result<List<String>> convertToModel(String value, ValueContext context) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String convertToPresentation(List<String> value, ValueContext context) {
	    return value.toString();
	}

}

Linha 397 - Classe VendaView

binderVenda.setBean(venda);

Linha 158 - VendaView

novoClick();

Metodo NovoClick();

    private void novoClick() {

		novaVenda();
		binderVenda.setBean(venda);

		dlgJanela.open();
		txtNomeCliente.focus();
	}

Tente isso:

binder.forField(campoDaDescricaoAqui).withConverter(new StringToNameConverter()).bind(Venda::getDescricao, Venda::setDescricao);

agora deu este @RoinujNosde

java.lang.NullPointerException: null
	at com.vaadin.flow.data.binder.ValidationResultWrap.handle(ValidationResultWrap.java:81) ~[flow-data-2.4.6.jar:2.4.6]
	at com.vaadin.flow.data.binder.Result.ifOk(Result.java:145) ~[flow-data-2.4.6.jar:2.4.6]
	at com.vaadin.flow.data.binder.Binder$BindingImpl.initFieldValue(Binder.java:1199) ~[flow-data-2.4.6.jar:2.4.6]
	at com.vaadin.flow.data.binder.Binder$BindingImpl.access$200(Binder.java:1032) ~[flow-data-2.4.6.jar:2.4.6]
	at com.vaadin.flow.data.binder.Binder.lambda$setBean$1(Binder.java:1772) ~[flow-data-2.4.6.jar:2.4.6]
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1507) ~[na:na]
	at com.vaadin.flow.data.binder.Binder.setBean(Binder.java:1772) ~[flow-data-2.4.6.jar:2.4.6]
	at br.com.fjsistemas.compraVenda.VendaView.novoClick(VendaView.java:397) ~[classes/:na]
	at br.com.fjsistemas.compraVenda.VendaView.lambda$0(VendaView.java:158) ~[classes/:na]
	at com.vaadin.flow.component.ComponentEventBus.fireEventForListener(ComponentEventBus.java:205) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.component.ComponentEventBus.handleDomEvent(ComponentEventBus.java:373) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.component.ComponentEventBus.lambda$addDomTrigger$dd1b7957$1(ComponentEventBus.java:264) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.internal.nodefeature.ElementListenerMap.lambda$fireEvent$2(ElementListenerMap.java:441) ~[flow-server-2.4.6.jar:2.4.6]
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1507) ~[na:na]
	at com.vaadin.flow.internal.nodefeature.ElementListenerMap.fireEvent(ElementListenerMap.java:441) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.rpc.EventRpcHandler.handleNode(EventRpcHandler.java:59) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.rpc.AbstractRpcInvocationHandler.handle(AbstractRpcInvocationHandler.java:64) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.ServerRpcHandler.handleInvocationData(ServerRpcHandler.java:409) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.ServerRpcHandler.lambda$handleInvocations$1(ServerRpcHandler.java:390) ~[flow-server-2.4.6.jar:2.4.6]
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1507) ~[na:na]
	at com.vaadin.flow.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:390) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:317) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:89) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1547) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:247) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.spring.SpringServlet.service(SpringServlet.java:111) ~[vaadin-spring-12.3.2.jar:na]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:352) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.springframework.web.servlet.mvc.ServletForwardingController.handleRequestInternal(ServletForwardingController.java:141) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:177) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:52) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1060) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:652) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.3.jar:5.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.3.jar:5.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.3.jar:5.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at java.base/java.lang.Thread.run(Thread.java:830) ~[na:na]

Falta implementar a lógica desse.

@RoinujNosde

Tentei desta forma:

    @Override
	public Result<List<String>> convertToModel(String value, ValueContext context) {
		return Result.ok(null);
	}

mas deu este stack quando cliquei no botão salvar

java.lang.NullPointerException: null
	at br.com.fjsistemas.compraVenda.VendaView.lambda$5(VendaView.java:198) ~[classes/:na]
	at com.vaadin.flow.component.grid.Grid.lambda$addColumn$63838bef$1(Grid.java:1471) ~[vaadin-grid-flow-4.3.8.jar:na]
	at com.vaadin.flow.component.grid.ColumnPathRenderer$SingleValueProviderRendering.lambda$getDataGenerator$26f92027$1(ColumnPathRenderer.java:98) ~[vaadin-grid-flow-4.3.8.jar:na]
	at com.vaadin.flow.data.provider.CompositeDataGenerator.lambda$generateData$0(CompositeDataGenerator.java:47) ~[flow-data-2.4.6.jar:2.4.6]
	at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[na:na]
	at com.vaadin.flow.data.provider.CompositeDataGenerator.generateData(CompositeDataGenerator.java:47) ~[flow-data-2.4.6.jar:2.4.6]
	at com.vaadin.flow.data.provider.DataCommunicator.generateJson(DataCommunicator.java:665) ~[flow-data-2.4.6.jar:2.4.6]
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) ~[na:na]
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) ~[na:na]
	at java.base/java.util.stream.IntPipeline$1$1.accept(IntPipeline.java:180) ~[na:na]
	at java.base/java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Streams.java:104) ~[na:na]
	at java.base/java.util.Spliterator$OfInt.forEachRemaining(Spliterator.java:699) ~[na:na]
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[na:na]
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[na:na]
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) ~[na:na]
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:na]
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) ~[na:na]
	at com.vaadin.flow.data.provider.DataCommunicator.getJsonItems(DataCommunicator.java:622) ~[flow-data-2.4.6.jar:2.4.6]
	at com.vaadin.flow.data.provider.DataCommunicator.collectChangesToSend(DataCommunicator.java:560) ~[flow-data-2.4.6.jar:2.4.6]
	at com.vaadin.flow.data.provider.DataCommunicator.flush(DataCommunicator.java:477) ~[flow-data-2.4.6.jar:2.4.6]
	at com.vaadin.flow.data.provider.DataCommunicator.lambda$requestFlush$2f364bb9$1(DataCommunicator.java:425) ~[flow-data-2.4.6.jar:2.4.6]
	at com.vaadin.flow.internal.StateTree.lambda$runExecutionsBeforeClientResponse$2(StateTree.java:390) ~[flow-server-2.4.6.jar:2.4.6]
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[na:na]
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) ~[na:na]
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1621) ~[na:na]
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[na:na]
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[na:na]
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[na:na]
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[na:na]
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:na]
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497) ~[na:na]
	at com.vaadin.flow.internal.StateTree.runExecutionsBeforeClientResponse(StateTree.java:387) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.UidlWriter.encodeChanges(UidlWriter.java:411) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.UidlWriter.createUidl(UidlWriter.java:187) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.UidlRequestHandler.writeUidl(UidlRequestHandler.java:121) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:90) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1547) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:247) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.spring.SpringServlet.service(SpringServlet.java:111) ~[vaadin-spring-12.3.2.jar:na]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:352) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.springframework.web.servlet.mvc.ServletForwardingController.handleRequestInternal(ServletForwardingController.java:141) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:177) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:52) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1060) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:652) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.3.jar:5.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.3.jar:5.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.3.jar:5.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at java.base/java.lang.Thread.run(Thread.java:830) ~[na:na]

Aqui dentro você precisa popular uma lista (new ArrayList(), por ex) extraindo os dados da String value.

@Override
	public Result<List<String>> convertToModel(String value, ValueContext context) {
		return Result.ok(new ArrayList<>());
	}

Assim? @RoinujNosde

  1. Você não usa a variável value.
    O objetivo do Converter é pegar um objeto de um tipo e converter para outro, um mais fácil de ser exibido. A variável value é o valor a ser convertido.

  2. new ArrayList() cria uma lista vazia. E como vc não tá adicionando nada, não vai salvar nada no banco.

Tente isso:

        @Override
	public Result<List<String>> convertToModel(String value, ValueContext context) {
            //aqui value teria um valor no estilo de "banana:abacaxi", o split() vai separá-los
            //Arrays.asList transforma em List
            return Result.ok(Arrays.asList(value.split(":")));	
	}

	@Override
	public String convertToPresentation(List<String> value, ValueContext context) {
            //esse método vai criar uma String a partir da lista, separando seus elementos por `:`
            //exemplo: banana:abacaxi
	    return String.join(":", value);
	}

@RoinujNosde

Bom dia, desculpe a demora em responder, tive alguns contratempos.

Alterei então o conversor da maneira que me explicou, então neste momento o Conversor se encontra desta forma:

Conversor:

package br.com.fjsistemas.backend;

import java.util.Arrays;
import java.util.List;

import com.vaadin.flow.data.binder.Result;
import com.vaadin.flow.data.binder.ValueContext;
import com.vaadin.flow.data.converter.Converter;

public class StringConverter implements Converter<String, List<String>> {

	private static final long serialVersionUID = 1L;

	public Class<Venda> getModelType() {
		return Venda.class;
	}

	public Class<String> getPresentationType() {
		return String.class;
	}

    @Override
public Result<List<String>> convertToModel(String value, ValueContext context) {
      
        return Result.ok(Arrays.asList(value.split(":")));
    }
    
    @Override
	public String convertToPresentation(List<String> value, ValueContext context) {
            //esse método vai criar uma String a partir da lista, separando seus elementos por `:`
            //exemplo: banana:abacaxi
	    return String.join(":", value);
    }
}

agora obtive este stack:

java.lang.IllegalStateException: All bindings created with forField must be completed before calling setBean
	at com.vaadin.flow.data.binder.Binder.checkBindingsCompleted(Binder.java:2699) ~[flow-data-2.4.6.jar:2.4.6]
	at com.vaadin.flow.data.binder.Binder.setBean(Binder.java:1763) ~[flow-data-2.4.6.jar:2.4.6]
	at br.com.fjsistemas.compraVenda.VendaView.novoClick(VendaView.java:397) ~[classes/:na]
	at br.com.fjsistemas.compraVenda.VendaView.lambda$0(VendaView.java:158) ~[classes/:na]
	at com.vaadin.flow.component.ComponentEventBus.fireEventForListener(ComponentEventBus.java:205) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.component.ComponentEventBus.handleDomEvent(ComponentEventBus.java:373) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.component.ComponentEventBus.lambda$addDomTrigger$dd1b7957$1(ComponentEventBus.java:264) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.internal.nodefeature.ElementListenerMap.lambda$fireEvent$2(ElementListenerMap.java:441) ~[flow-server-2.4.6.jar:2.4.6]
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1507) ~[na:na]
	at com.vaadin.flow.internal.nodefeature.ElementListenerMap.fireEvent(ElementListenerMap.java:441) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.rpc.EventRpcHandler.handleNode(EventRpcHandler.java:59) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.rpc.AbstractRpcInvocationHandler.handle(AbstractRpcInvocationHandler.java:64) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.ServerRpcHandler.handleInvocationData(ServerRpcHandler.java:409) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.ServerRpcHandler.lambda$handleInvocations$1(ServerRpcHandler.java:390) ~[flow-server-2.4.6.jar:2.4.6]
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1507) ~[na:na]
	at com.vaadin.flow.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:390) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:317) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:89) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1547) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:247) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.spring.SpringServlet.service(SpringServlet.java:111) ~[vaadin-spring-12.3.2.jar:na]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:352) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.springframework.web.servlet.mvc.ServletForwardingController.handleRequestInternal(ServletForwardingController.java:141) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:177) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:52) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1060) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:652) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.3.jar:5.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.3.jar:5.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.3.jar:5.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at java.base/java.lang.Thread.run(Thread.java:830) ~[na:na]

Linha 397 VendaView

@RoinujNosde

este stack da quando eu vou salvar a venda…o stack anterior estava dando ao tentar lançar uma nova venda(este segundo foi corrigido com o código que passou)

java.lang.NullPointerException: null
	at br.com.fjsistemas.compraVenda.VendaView.salvarClick(VendaView.java:358) ~[classes/:na]
	at br.com.fjsistemas.compraVenda.VendaView.lambda$14(VendaView.java:317) ~[classes/:na]
	at com.vaadin.flow.component.ComponentEventBus.fireEventForListener(ComponentEventBus.java:205) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.component.ComponentEventBus.handleDomEvent(ComponentEventBus.java:373) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.component.ComponentEventBus.lambda$addDomTrigger$dd1b7957$1(ComponentEventBus.java:264) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.internal.nodefeature.ElementListenerMap.lambda$fireEvent$2(ElementListenerMap.java:441) ~[flow-server-2.4.6.jar:2.4.6]
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1507) ~[na:na]
	at com.vaadin.flow.internal.nodefeature.ElementListenerMap.fireEvent(ElementListenerMap.java:441) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.rpc.EventRpcHandler.handleNode(EventRpcHandler.java:59) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.rpc.AbstractRpcInvocationHandler.handle(AbstractRpcInvocationHandler.java:64) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.ServerRpcHandler.handleInvocationData(ServerRpcHandler.java:409) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.ServerRpcHandler.lambda$handleInvocations$1(ServerRpcHandler.java:390) ~[flow-server-2.4.6.jar:2.4.6]
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1507) ~[na:na]
	at com.vaadin.flow.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:390) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:317) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:89) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1547) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:247) ~[flow-server-2.4.6.jar:2.4.6]
	at com.vaadin.flow.spring.SpringServlet.service(SpringServlet.java:111) ~[vaadin-spring-12.3.2.jar:na]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:352) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.springframework.web.servlet.mvc.ServletForwardingController.handleRequestInternal(ServletForwardingController.java:141) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:177) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:52) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1060) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:652) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.3.jar:5.3.3]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.3.jar:5.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.3.jar:5.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.3.jar:5.3.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
	at java.base/java.lang.Thread.run(Thread.java:830) ~[na:na]

Linha 358:

Linha 317:

venda está null na linha 358

@RoinujNosde

sim, isso eu entendi

então aqui na linha 358

teria que ser assim:

boolean adicionarLista = venda.getId() != null ? true : false;

Você precisa entender como a NullPointerException funciona.

Acessar variáveis ou métodos de instância em uma referência que está null vai causar essa exceção.
venda está null.
O . é usado para acessar variáveis/métodos

Ou seja, seu código não mudou nada para corrigir o erro. Continua acessando o getId().

Tem que fazer verificação em “venda”.
venda == null
venda != null

Ou descobrir por que agora está ficando null, sendo que antes não ficava.

@RoinujNosde

fiz como sugeriu, verifiquei a venda fazendo isso:

private void salvarClick() {

		venda = binderVenda.getBean();
		
		if(venda != null) {

		boolean adicionarLista = venda.getId() == null ? true : false;
		
		vendaService.create(venda);
		
		
		if (adicionarLista) {
			listaVendas.add(venda);

		}
		atualizaGrdVenda();
		novaVenda();
		txtNomeCliente.focus();

		binderVenda.setBean(venda);

		if (adicionarLista) {
			
			dlgJanela.close();
		}}else {
			System.out.println("Venda é Nula");
		}
	} 

fazendo isso o null deixou de existir, está sem nenhum stack(o que creio que seja algo bom)

mas quando clico em salvar, nada aparece na grid:

verifiquei no banco e realmente nada foi salvo

O que vc acha que pode ser?

Você precisa analisar bem o seu código.
Não está faltando nenhum “binder.setBean(venda)”?
Se o getBean retorna null, pode ser que não setou ainda.

@RoinujNosde e @Lucas_Camara

Bom dia amigos!!

Eu fiz algumas alterações no código, nada muito radical, para tentar deixar mais fácil para eu aprender e tbm para vcs entenderem, peço para que esqueçam tudo que vimos anteriormente, e partimos deste post atual.

O problema ainda é o mesmo, salvar os produtos vendidos. Então fiz o seguinte:

Tenho a classe Venda:

package br.com.fjsistemas.backend;

import java.time.LocalDate;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Data
@Entity
public class Venda {

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;

	private LocalDate dataVenda = LocalDate.now();

	@ManyToOne
	private Cliente cliente;
	
	@ManyToOne
	private FormaDePagamento formaDePagamento;
	
	private String valorTotalVenda;
}

Na classe venda, não criei nenhuma lista pois quero fazer passo a passo com vcs!!!

tbm criei a classe VendaItem:

package br.com.fjsistemas.backend;

import java.math.BigDecimal;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Data
@Entity
public class VendaItem {
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn( name = "venda_id", referencedColumnName = "id" )
	private Venda venda;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn( name = "produto_id", referencedColumnName = "id" )
	private Produto produto;
	
	private Integer quantidade;
	private BigDecimal valorUnitario;
	private BigDecimal valorTotal;
	
}

tbm não criei nenhuma lista ou qualquer outra coisa, pois quero fazer passo a passo, pois só assim vou entender e aprender

e por fim tenho a classe VendaView

package br.com.fjsistemas.compraVenda;

import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;

import com.vaadin.flow.component.button.Button;
import com.vaadin.flow.component.button.ButtonVariant;
import com.vaadin.flow.component.combobox.ComboBox;
import com.vaadin.flow.component.datepicker.DatePicker;
import com.vaadin.flow.component.dialog.Dialog;
import com.vaadin.flow.component.formlayout.FormLayout;
import com.vaadin.flow.component.formlayout.FormLayout.ResponsiveStep;
import com.vaadin.flow.component.grid.Grid;
import com.vaadin.flow.component.grid.GridVariant;
import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.component.textfield.TextField;
import com.vaadin.flow.data.binder.Binder;
import com.vaadin.flow.data.binder.PropertyId;
import com.vaadin.flow.data.renderer.LocalDateRenderer;
import com.vaadin.flow.router.PageTitle;
import com.vaadin.flow.router.Route;

import br.com.fjsistemas.backend.Cliente;
import br.com.fjsistemas.backend.FormaDePagamento;
import br.com.fjsistemas.backend.Venda;
import br.com.fjsistemas.backend.VendaItem;
import br.com.fjsistemas.main.MainView;
import br.com.fjsistemas.repository.ClienteRepository;
import br.com.fjsistemas.repository.FormaDePagamentoRepository;
import br.com.fjsistemas.repository.ProdutoRepository;
import br.com.fjsistemas.service.VendaService;

@Route(value = "venda-view", layout = MainView.class)
@PageTitle("Lançamento de Vendas")
public class VendaView extends VerticalLayout {

	private static final long serialVersionUID = 1L;

	private FormLayout fltVenda = new FormLayout();
	@PropertyId("dataVenda")
	private DatePicker txtDataVenda = new DatePicker("Data Venda");

	@PropertyId("cliente")
	private ComboBox<Cliente> cbxCliente = new ComboBox<>("Cliente");

	@PropertyId("telefone")
	private TextField txtTelefone = new TextField("Telefone");

	@PropertyId("celular")
	private TextField txtCelular = new TextField("Celular");

	@PropertyId("endereco")
	private TextField txtEndereco = new TextField("Endereço");

	@PropertyId("numero")
	private TextField txtNumero = new TextField("Nº");

	@PropertyId("bairro")
	private TextField txtBairro = new TextField("Bairro");

	@PropertyId("cidade")
	TextField txtCidade = new TextField("Cidade");

	@PropertyId("estado")
	TextField txtEstado = new TextField("Estado");

	@PropertyId("formaDePagamento")
	private ComboBox<FormaDePagamento> txtFormasPagamento = new ComboBox<>("Formas de Pagamento");

	@PropertyId("valorTotalVenda")
	private TextField campoSomaValores = new TextField();

	private VerticalLayout vltVenda = new VerticalLayout();
	Grid<Venda> grdVenda = new Grid<>(Venda.class, false);
	Grid<VendaItem> grdVendidos = new Grid<>(VendaItem.class, false);

	private HorizontalLayout hltBarraBotoes = new HorizontalLayout();
	Button btnNovo = new Button("Novo");
	Button btnAlterar = new Button("Alterar");
	Button btnExcluir = new Button("Excluir");

	private Dialog dlgJanela = new Dialog();

	HorizontalLayout primeiraLinhaDivSuperior = new HorizontalLayout();
	HorizontalLayout segundaLinhaDivSuperior = new HorizontalLayout();
	HorizontalLayout adicionarProdutos = new HorizontalLayout();

	double somaValores;

	private Button btnSalvar = new Button("Salvar");
	private Button btnFechar = new Button("Fechar");
	private Button btnAdicionarItem = new Button("Adicionar Produtos");

	@Autowired
	VendaService vendaService;

	@Autowired
	ClienteRepository clienteRepository;

	@Autowired
	FormaDePagamentoRepository formaDePagamentoRepository;

	@Autowired
	ProdutoRepository produtoRepository;

	private List<Venda> listaVendas;

	private List<Cliente> listaDeClientes = new ArrayList<>();
	List<FormaDePagamento> listaPagamento = new ArrayList<>();
	

	private Venda venda;

	Binder<Venda> binderVenda = new Binder<>(Venda.class);

	public VendaView() {

	}

	@PostConstruct
	public void init() {
		configuraTela();

	}

	private void configuraTela() {

		setMargin(false);
		setPadding(false);

		configuraVltVenda();
		configuraFltBarraBotoes();

		populaGrdVenda();
		populaCbxCliente();
		populaFormaPagamento();
		configuraBinder();

		add(fltVenda, vltVenda, hltBarraBotoes);
	}

	private void configuraFltBarraBotoes() {

		btnNovo.addThemeVariants(ButtonVariant.LUMO_PRIMARY);
		btnNovo.addClickListener(e -> {
			novoClick();
		});

		btnAlterar.addThemeVariants(ButtonVariant.LUMO_PRIMARY);
		btnAlterar.addClickListener(e -> {
			alterarClick();
		});

		btnExcluir.addThemeVariants(ButtonVariant.LUMO_PRIMARY);
		btnExcluir.addClickListener(e -> {
			excluirClick();
		});

		hltBarraBotoes.add(btnNovo, btnAlterar, btnExcluir);
	}

	private void excluirClick() {

		if (venda != null) {
			listaVendas.remove(venda);
			vendaService.delete(venda);
			atualizaGrdVenda();
		}
	}

	private void configuraVltVenda() {
		vltVenda.setWidthFull();
		vltVenda.setHeight("820px");
		vltVenda.getStyle().set("margin-top", "0");
		vltVenda.setMargin(false);
		vltVenda.setPadding(false);
		configuraGrdVenda();
		vltVenda.add(grdVenda);
	}

	private void configuraGrdVenda() {
		grdVenda.setHeight("320px");
		grdVenda.setWidthFull();

		grdVenda.addColumn(Venda::getId).setHeader("ID:").setAutoWidth(true);

		grdVenda.addColumn(new LocalDateRenderer<>(Venda::getDataVenda, DateTimeFormatter.ofPattern("dd/MM/yyy")))
				.setHeader("Data Venda").setAutoWidth(true);

		grdVenda.addColumn(venda -> venda.getCliente().getNome()).setHeader("Nome:").setAutoWidth(true)
				.setKey("cliente.nome");

		grdVenda.addColumn(Venda::getValorTotalVenda).setHeader("Valor Total:").setAutoWidth(true)
				.setKey("valorTotalVenda");

		grdVenda.addColumn(venda -> venda.getFormaDePagamento().getFormaDePagamento()).setHeader("Forma de Pagamento")
				.setAutoWidth(true).setKey("formaDePagamento");

		grdVenda.addThemeVariants(GridVariant.LUMO_COMPACT, GridVariant.LUMO_COLUMN_BORDERS);

		grdVenda.getColumns().forEach(col -> col.setAutoWidth(true).setSortable(true).setResizable(true));

		grdVenda.addItemClickListener(e -> {
			venda = e.getItem();
			binderVenda.setBean(venda);

		});

		grdVenda.addItemDoubleClickListener(event -> {
			if (venda != null) {
				binderVenda.readBean(venda);
			}
		});

	}

		private void populaFormaPagamento() {
		listaPagamento = formaDePagamentoRepository.findAll();
		txtFormasPagamento.setItemLabelGenerator(FormaDePagamento::getFormaDePagamento);
		txtFormasPagamento.setItems(listaPagamento);
	}

	private void populaCbxCliente() {
		cbxCliente.setItemLabelGenerator(cliente -> {
			if (cliente == null || cliente.getNome() == null) {
				return " ";

			} else {
				return cliente.getNome();
			}
		});

		listaDeClientes = clienteRepository.findAll();
		cbxCliente.setItems(listaDeClientes);
	}

	private void salvarClick() {

		venda = binderVenda.getBean();

		boolean adicionarLista = venda.getId() == null ? true : false;

		vendaService.create(venda);

		if (adicionarLista) {
			listaVendas.add(venda);

		}
		atualizaGrdVenda();
		novaVenda();
		cbxCliente.focus();

		binderVenda.setBean(venda);

		if (adicionarLista) {

		}
	}

	private void populaGrdVenda() {

		listaVendas = vendaService.read();
		atualizaGrdVenda();
	}

	private void atualizaGrdVenda() {
		grdVenda.setItems(listaVendas);
	}

	private void configuraBinder() {

		binderVenda.bindInstanceFields(this);

	}

	private void janelaVenda() {

		dlgJanela.open();
		dlgJanela.setWidthFull();
		dlgJanela.setHeightFull();
		fltVenda.setWidthFull();

		btnAdicionarItem.addThemeVariants(ButtonVariant.LUMO_PRIMARY);
		btnAdicionarItem.getStyle().set("margin-top", "0em");
		btnAdicionarItem.addClickListener(e -> {
			adicionarProdutos();
		});

		fltVenda.setResponsiveSteps(new ResponsiveStep("25em", 1), new ResponsiveStep("25em", 2),
				new ResponsiveStep("25em", 3), new ResponsiveStep("25em", 4));
		fltVenda.add(txtDataVenda, cbxCliente, txtTelefone, txtCelular, txtEndereco, txtNumero, txtBairro, txtCidade,
				txtEstado, txtFormasPagamento, btnAdicionarItem);

		cbxCliente.addValueChangeListener(event -> {
			if (event.getValue() == null || event.getValue().getFone() == null) {
				txtTelefone.setValue(" ");
			} else {
				txtTelefone.setValue(event.getValue().getFone());
			}
			if (event.getValue() == null || event.getValue().getCelular() == null) {
				txtCelular.setValue(" ");
			} else {
				txtCelular.setValue(event.getValue().getCelular());
			}
			if (event.getValue() == null || event.getValue().getEndereco() == null) {
				txtEndereco.setValue(" ");
			} else {
				txtEndereco.setValue(event.getValue().getEndereco());
			}
			if (event.getValue() == null || event.getValue().getNumero() == null) {
				txtNumero.setValue(" ");
			} else {
				txtNumero.setValue(event.getValue().getNumero());
			}
			if (event.getValue() == null || event.getValue().getBairro() == null) {
				txtBairro.setValue(" ");
			} else {
				txtBairro.setValue(event.getValue().getBairro());
			}
			if (event.getValue() == null || event.getValue().getCidade() == null) {
				txtCidade.setValue(" ");
			} else {
				txtCidade.setValue(event.getValue().getCidade());
			}
			if (event.getValue() == null || event.getValue().getEstado() == null) {
				txtEstado.setValue(" ");
			} else {
				txtEstado.setValue(event.getValue().getEstado());
			}

		});

		grdVendidos.setWidthFull();
		grdVendidos.setHeight("600px");

		grdVendidos.addColumn(VendaItem::getProduto).setHeader("Produto:").setAutoWidth(true);
		grdVendidos.addColumn(VendaItem::getQuantidade).setHeader("Quantidade:").setAutoWidth(true);
		grdVendidos.addColumn(VendaItem::getValorUnitario).setHeader("Valor Unitário:").setAutoWidth(true);
		grdVendidos.addColumn(VendaItem::getValorTotal).setHeader("Valor Total:").setAutoWidth(true);

		btnSalvar.addThemeVariants(ButtonVariant.LUMO_PRIMARY);
		btnSalvar.getStyle().set("margin-top", "5px");
		btnSalvar.getStyle().set("margin-left", "0em");
		btnSalvar.addClickListener(e -> {
			salvarClick();

		});

		btnFechar.addThemeVariants(ButtonVariant.LUMO_PRIMARY);
		btnFechar.getStyle().set("margin-top", "0em");
		btnFechar.getStyle().set("margin-left", "1em");
		btnFechar.addClickListener(e -> {
			dlgJanela.close();

		});

		dlgJanela.add(fltVenda, grdVendidos, btnSalvar, btnFechar);

	}

	private void adicionarProdutos() {

		Dialog janelaProdutoVendido = new Dialog();
		janelaProdutoVendido.open();
		janelaProdutoVendido.setWidthFull();
		janelaProdutoVendido.setHeightFull();

		
	}

	private void novoClick() {

		novaVenda();
		binderVenda.setBean(venda);
		janelaVenda();
		cbxCliente.focus();
	}

	private void alterarClick() {

		if (venda != null) {
			binderVenda.setBean(venda);
			// dlgJanela.open();

		}
	}

	private void novaVenda() {
		venda = new Venda();
		venda.setCliente(null);
		venda.setFormaDePagamento(null);
	}
}

Visualmente, ficou desta forma:

Tela Inicial - Vendas

Agora vamos ao que preciso de ajuda, como vcs viram na imagem acima tenho um botão “Adicionar Produtos”

Neste botão tenho uma lóigica simples:

    btnAdicionarItem.addThemeVariants(ButtonVariant.LUMO_PRIMARY);
		btnAdicionarItem.getStyle().set("margin-top", "0em");
		btnAdicionarItem.addClickListener(e -> {
			adicionarProdutos();
		});

Como podem ver, ele chama o metodo adicionarProdutos();

que está aqui:

    private void adicionarProdutos() {

		Dialog janelaProdutoVendido = new Dialog();
		janelaProdutoVendido.open();
		janelaProdutoVendido.setWidthFull();
		janelaProdutoVendido.setHeightFull();

		
	}

Eu não não implementei mais, pois tbm quero fazer este metodo passo a passo com vcs

Então quando clico no botão Adicionar Produtos, fica assim:

uma janela em branco.

Vcs podem agora me ajudar a construir esta tela de vendas? Não precisa ser nada muito elaborado, algo simples, como escolher o produto, digitar a quantidade, valor unitario e valor total…e tbm adicionar quantos produtos forem necessários a uma venda(1 venda pode ter infinitos produtos).

Desculpem pelo post gigante!! Obg novamente!!!