java - Vaadin navigation error -


i ve got problem navigation in vaadin. have made everythink here: http://vaadin.github.io/spring-tutorial/#_views_and_navigation_with_vaadin_spring

and tried search internet answer, example here: https://vaadin.com/wiki/-/wiki/10674/iii+-+views+and+navigation+with+vaadin+spring?_36_delta=20&_36_keywords=&_36_advancedsearch=false&_36_andoperator=true&p_r_p_564233524_resetcur=false&_36_cur=2

but still have error:

java.lang.illegalargumentexception: trying navigate unknown state '' , error view provider not present @ com.vaadin.navigator.navigator.navigateto(navigator.java:557) ~[vaadin-server-8.1.0.jar:8.1.0] @ com.vaadin.ui.ui.doinit(ui.java:750) ~[vaadin-server-8.1.0.jar:8.1.0] @ com.vaadin.server.communication.uiinithandler.getbrowserdetailsui(uiinithandler.java:216) [vaadin-server-8.1.0.jar:8.1.0] @ com.vaadin.server.communication.uiinithandler.synchronizedhandlerequest(uiinithandler.java:74) [vaadin-server-8.1.0.jar:8.1.0] @ com.vaadin.server.synchronizedrequesthandler.handlerequest(synchronizedrequesthandler.java:41) [vaadin-server-8.1.0.jar:8.1.0] @ com.vaadin.server.vaadinservice.handlerequest(vaadinservice.java:1568) [vaadin-server-8.1.0.jar:8.1.0] @ com.vaadin.server.vaadinservlet.service(vaadinservlet.java:381) [vaadin-server-8.1.0.jar:8.1.0] @ javax.servlet.http.httpservlet.service(httpservlet.java:742) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:231) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:166) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.catalina.core.applicationdispatcher.invoke(applicationdispatcher.java:728) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.catalina.core.applicationdispatcher.processrequest(applicationdispatcher.java:467) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.catalina.core.applicationdispatcher.doforward(applicationdispatcher.java:351) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.catalina.core.applicationdispatcher.forward(applicationdispatcher.java:311) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.springframework.web.servlet.mvc.servletforwardingcontroller.handlerequestinternal(servletforwardingcontroller.java:133) [spring-webmvc-4.3.10.release.jar:4.3.10.release] @ org.springframework.web.servlet.mvc.abstractcontroller.handlerequest(abstractcontroller.java:174) [spring-webmvc-4.3.10.release.jar:4.3.10.release] @ org.springframework.web.servlet.mvc.simplecontrollerhandleradapter.handle(simplecontrollerhandleradapter.java:50) [spring-webmvc-4.3.10.release.jar:4.3.10.release] @ org.springframework.web.servlet.dispatcherservlet.dodispatch(dispatcherservlet.java:967) [spring-webmvc-4.3.10.release.jar:4.3.10.release] @ org.springframework.web.servlet.dispatcherservlet.doservice(dispatcherservlet.java:901) [spring-webmvc-4.3.10.release.jar:4.3.10.release] @ org.springframework.web.servlet.frameworkservlet.processrequest(frameworkservlet.java:970) [spring-webmvc-4.3.10.release.jar:4.3.10.release] @ org.springframework.web.servlet.frameworkservlet.dopost(frameworkservlet.java:872) [spring-webmvc-4.3.10.release.jar:4.3.10.release] @ javax.servlet.http.httpservlet.service(httpservlet.java:661) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.springframework.web.servlet.frameworkservlet.service(frameworkservlet.java:846) [spring-webmvc-4.3.10.release.jar:4.3.10.release] @ javax.servlet.http.httpservlet.service(httpservlet.java:742) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:231) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:166) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.tomcat.websocket.server.wsfilter.dofilter(wsfilter.java:52) [tomcat-embed-websocket-8.5.16.jar:8.5.16] @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:193) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:166) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.springframework.web.filter.requestcontextfilter.dofilterinternal(requestcontextfilter.java:99) [spring-web-4.3.10.release.jar:4.3.10.release] @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) [spring-web-4.3.10.release.jar:4.3.10.release] @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:193) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:166) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.springframework.web.filter.httpputformcontentfilter.dofilterinternal(httpputformcontentfilter.java:105) [spring-web-4.3.10.release.jar:4.3.10.release] @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) [spring-web-4.3.10.release.jar:4.3.10.release] @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:193) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:166) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.springframework.web.filter.hiddenhttpmethodfilter.dofilterinternal(hiddenhttpmethodfilter.java:81) [spring-web-4.3.10.release.jar:4.3.10.release] @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) [spring-web-4.3.10.release.jar:4.3.10.release] @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:193) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:166) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.springframework.web.filter.characterencodingfilter.dofilterinternal(characterencodingfilter.java:197) [spring-web-4.3.10.release.jar:4.3.10.release] @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) [spring-web-4.3.10.release.jar:4.3.10.release] @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:193) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:166) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:198) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:96) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.catalina.authenticator.authenticatorbase.invoke(authenticatorbase.java:478) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:140) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:80) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:87) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:342) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.coyote.http11.http11processor.service(http11processor.java:799) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.coyote.abstractprocessorlight.process(abstractprocessorlight.java:66) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.coyote.abstractprotocol$connectionhandler.process(abstractprotocol.java:868) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.tomcat.util.net.nioendpoint$socketprocessor.dorun(nioendpoint.java:1455) [tomcat-embed-core-8.5.16.jar:8.5.16] @ org.apache.tomcat.util.net.socketprocessorbase.run(socketprocessorbase.java:49) [tomcat-embed-core-8.5.16.jar:8.5.16] @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1142) [na:1.8.0_111] @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:617) [na:1.8.0_111] @ org.apache.tomcat.util.threads.taskthread$wrappingrunnable.run(taskthread.java:61) [tomcat-embed-core-8.5.16.jar:8.5.16] @ java.lang.thread.run(thread.java:745) [na:1.8.0_111] 

my clases:

@springui(path = "test") @springviewdisplay @theme("valo") public class testui extends ui implements viewdisplay {      private panel springviewdisplay;      @override     protected void init(vaadinrequest request) {         final verticallayout root = new verticallayout();         root.setsizefull();         setcontent(root);          final csslayout navigationbar = new csslayout();         navigationbar.addstylename(valotheme.layout_component_group);         navigationbar.addcomponent(createnavigationbutton("login view", loginview.view_name));         navigationbar.addcomponent(createnavigationbutton("menu view", menuview.view_name));         root.addcomponent(navigationbar);          springviewdisplay = new panel();         springviewdisplay.setsizefull();         root.addcomponent(springviewdisplay);         root.setexpandratio(springviewdisplay, 1.0f);     }      private button createnavigationbutton(string caption, final string viewname) {         button button = new button(caption);         button.addstylename(valotheme.button_small);         button.addclicklistener(event -> getui().getnavigator().navigateto(viewname));         return button;     }      @override     public void showview(view view) {         springviewdisplay.setcontent((component) view);     } }  @uiscope @springview(name = loginview.view_name) public class loginview extends verticallayout implements view {      public static final string view_name = "login";      @postconstruct     public void init() {         addcomponent(new label("created view"));     }      @override     public void enter(viewchangelistener.viewchangeevent event) {      } }  @uiscope @springview(name = menuview.view_name) public class menuview extends verticallayout implements view {      public static final string view_name = "menu";      @postconstruct     public void init() {         setmargin(true);         setspacing(true);         addcomponent(new label("menu view"));     }      @override     public void enter(viewchangelistener.viewchangeevent event) {      }  } 

mayby still doing smth wrong or dont understand how works.

ps

this error shows during loading ui path. buttons working correctly.


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -