column上设置linkScreen报“实体访问拒绝”

我如此设置的列


运行时候,点第一个列报“实体访问拒绝”,点第二个列没有问题,请问是哪里设置不对吗?我只想显示关联属性的某一个字段,并实现link功能。

上传一下相关错误日志。

com.vaadin.server.ServerRpcManager$RpcInvocationException: Unable to invoke method onClick in com.haulmont.cuba.web.widgets.client.table.CubaTableServerRpc
at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:157) ~[vaadin-server-8.6.4-17-cuba.jar:8.6.4-17-cuba]
at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:115) ~[vaadin-server-8.6.4-17-cuba.jar:8.6.4-17-cuba]
at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:431) [vaadin-server-8.6.4-17-cuba.jar:8.6.4-17-cuba]
at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:396) [vaadin-server-8.6.4-17-cuba.jar:8.6.4-17-cuba]
at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:260) [vaadin-server-8.6.4-17-cuba.jar:8.6.4-17-cuba]
at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:82) [vaadin-server-8.6.4-17-cuba.jar:8.6.4-17-cuba]
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) [vaadin-server-8.6.4-17-cuba.jar:8.6.4-17-cuba]
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1577) [vaadin-server-8.6.4-17-cuba.jar:8.6.4-17-cuba]
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:425) [vaadin-server-8.6.4-17-cuba.jar:8.6.4-17-cuba]
at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:329) [cuba-web-7.1.0.BETA1.jar:7.1.0.BETA1]
at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:215) [cuba-web-7.1.0.BETA1.jar:7.1.0.BETA1]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) [servlet-api.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [catalina.jar:9.0.19]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.19]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat-websocket.jar:9.0.19]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.19]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.19]
at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:107) [spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:73) [spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:93) [cuba-web-7.1.0.BETA1.jar:7.1.0.BETA1]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.19]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.19]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200) [catalina.jar:9.0.19]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:9.0.19]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) [catalina.jar:9.0.19]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [catalina.jar:9.0.19]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [catalina.jar:9.0.19]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678) [catalina.jar:9.0.19]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [catalina.jar:9.0.19]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [catalina.jar:9.0.19]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) [tomcat-coyote.jar:9.0.19]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:9.0.19]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:836) [tomcat-coyote.jar:9.0.19]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1747) [tomcat-coyote.jar:9.0.19]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:9.0.19]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:9.0.19]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
Caused by: java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45]
at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:153) ~[vaadin-server-8.6.4-17-cuba.jar:8.6.4-17-cuba]
… 38 common frames omitted
Caused by: com.haulmont.cuba.core.global.EntityAccessException: Unable to load entity lims_Sample-50302271-f97a-056b-98ba-b8091d848fac because it has been deleted or access denied
at com.haulmont.cuba.gui.model.impl.InstanceLoaderImpl.load(InstanceLoaderImpl.java:101) ~[cuba-gui-7.1.0.BETA1.jar:7.1.0.BETA1]
at com.haulmont.cuba.gui.model.impl.ScreenDataImpl.loadAll(ScreenDataImpl.java:80) ~[cuba-gui-7.1.0.BETA1.jar:7.1.0.BETA1]
at com.haulmont.cuba.gui.model.impl.AnnotationBasedLoaderBeforeShow.loadData(AnnotationBasedLoaderBeforeShow.java:36) ~[cuba-gui-7.1.0.BETA1.jar:7.1.0.BETA1]
at com.haulmont.cuba.web.sys.WebScreens.loadDataBeforeShow(WebScreens.java:541) ~[cuba-web-7.1.0.BETA1.jar:7.1.0.BETA1]
at com.haulmont.cuba.web.sys.WebScreens.show(WebScreens.java:431) ~[cuba-web-7.1.0.BETA1.jar:7.1.0.BETA1]
at com.haulmont.cuba.web.sys.WebScreens.openEditor(WebScreens.java:1145) ~[cuba-web-7.1.0.BETA1.jar:7.1.0.BETA1]
at com.haulmont.cuba.web.gui.components.table.LinkCellClickListener.onClick(LinkCellClickListener.java:119) ~[cuba-web-7.1.0.BETA1.jar:7.1.0.BETA1]
at com.haulmont.cuba.gui.components.compatibility.TableCellClickListenerWrapper.accept(TableCellClickListenerWrapper.java:50) ~[cuba-gui-7.1.0.BETA1.jar:7.1.0.BETA1]
at com.haulmont.cuba.gui.components.compatibility.TableCellClickListenerWrapper.accept(TableCellClickListenerWrapper.java:24) ~[cuba-gui-7.1.0.BETA1.jar:7.1.0.BETA1]
at com.haulmont.cuba.web.gui.components.WebAbstractTable.lambda$setCellClickListener$8(WebAbstractTable.java:2917) ~[cuba-web-7.1.0.BETA1.jar:7.1.0.BETA1]
at com.haulmont.cuba.web.gui.components.WebAbstractTable$$Lambda$585/1405413378.onClick(Unknown Source) ~[na:na]
at com.haulmont.cuba.web.widgets.CubaTable$1.onClick(CubaTable.java:103) ~[cuba-web-widgets-7.1.0.BETA1.jar:na]
… 43 common frames omitted

看一下这个ID在 Sample 实体表中是否存在,这个ID可能是主实体的ID。

那没办法设置成Sample的ID了吗?我想像第二列那样打开Smaple,但是显示的又不是Sample的instanceName而是其中某个属性,怎么办?不能改instanceName

目前,你可以使用 linkInvoke 属性,写几行代码来调用指定的编辑界面。

可以,一言不合写代码!