Closed maistrenkoIulia closed 3 years ago
Fixed recalculation for dynattr attached to legacy screen. Now the RuntimePropertiesFrame does not fully support recalculation.
Case 1:
Case 2:
CUBA Platform version: 7.2-SNAPSHOT CUBA Studio plugin version: 15.0.SNAPSHOT2727-202 IntelliJ version: IntelliJ IDEA 2021.1.3 (Community Edition)
groovy.lang.MissingMethodException: No signature of method: java.lang.Integer.length() is applicable for argument types: () values: [] Possible solutions: next(), each(groovy.lang.Closure), with(groovy.lang.Closure), getAt(java.lang.String), with(boolean, groovy.lang.Closure), signum(int) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:70) at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:119) at Script1.run(Script1.groovy:2) at com.haulmont.cuba.core.sys.AbstractScripting.evaluateGroovy(AbstractScripting.java:206) at com.haulmont.cuba.core.sys.AbstractScripting.evaluateGroovy(AbstractScripting.java:234) at com.haulmont.cuba.core.app.dynamicattributes.DynamicAttributesRecalculationTools.evaluateGroovyScript(DynamicAttributesRecalculationTools.java:145) at com.haulmont.cuba.core.app.dynamicattributes.DynamicAttributesRecalculationTools.recalculateDynamicAttributes(DynamicAttributesRecalculationTools.java:89) at com.haulmont.cuba.gui.dynamicattributes.DynamicAttributesGuiTools.lambda$getValueChangeEventListener$4(DynamicAttributesGuiTools.java:582) at com.haulmont.bali.events.EventHub.publish(EventHub.java:170) at com.haulmont.cuba.web.gui.components.WebAbstractComponent.publish(WebAbstractComponent.java:100) at com.haulmont.cuba.web.gui.components.WebAbstractValueComponent.componentValueChanged(WebAbstractValueComponent.java:152) at com.haulmont.cuba.web.gui.components.WebTextField.componentValueChanged(WebTextField.java:229) at com.haulmont.cuba.web.gui.components.WebTextField.componentValueChanged(WebTextField.java:52) at com.haulmont.cuba.web.gui.components.WebV8AbstractField.lambda$attachValueChangeListener$ab1c93c8$1(WebV8AbstractField.java:144) at jdk.internal.reflect.GeneratedMethodAccessor156.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:496) at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:273) at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:237) at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1041) at com.vaadin.ui.AbstractField.setValue(AbstractField.java:144) at com.vaadin.ui.AbstractTextField$AbstractTextFieldServerRpcImpl.setText(AbstractTextField.java:57) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:153) at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:115) at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:431) at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:396) at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:260) at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:82) at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1578) at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:425) at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:329) at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:215) at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108) at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74) at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:93) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:829)
Environment
http://cubadev:9072/app/#main
Description of the bug or enhancement
TC: Dynamic Attributes>Create category for Car (ref_Car) entity Create first attr Create second attr >Calculated Values and Options> set Depends on = first Recalculation Values script = if (entity.getValue("+1first") == null) return 1 else return entity.getValue("+1first").length() Apply changes Cars>create new Car set value in 'first' attr ER: value of second attr has to be calcuated autometically AR: value of second attr is empty