org-scn-design-studio-community / lumiradesignercommunityext

Lumira Designer SCN Community Extensions
Apache License 2.0
3 stars 2 forks source link

Component Manager currently broken in Lumira SP02 #17

Open mikezaschka opened 7 years ago

mikezaschka commented 7 years ago

Hi Mike,

first of all a big thank you for all this amazing work! :-)

We heavily rely on the Component Manager in several of our clients applications. I haven't looked at the code but I assume this one is using lots of internal methods to add the dynamic nature of component lockups, etc. It seems there have been some changes and the ComponentManager is currently not working, throwing errors all over the place.

Have you already looked into this?

entmike commented 7 years ago

Hey Mike,

Yes I’ve actually written a few patches for Component Manager based on a few other reports (check the closed Issues for details)

If you can give me an error log, that will help me see what I may have missed. Also, I am assuming you are using a recent downloaded copy?

mikezaschka commented 6 years ago

We used a recent download (10 days ago), so the Component Manager fixes should be included. There are several errors:

First one

Components cannot be attached to groups anymore. It seems the internal casting is not working properly:

image008

Second one

`Message: org.mozilla.javascript.EcmaError: ReferenceError: “getComponentsFromGroup” is not defined. (CMP_MANAGER.getDataSourcesFromGroup()#3) Stack trace: com.sap.ip.bi.zen.rt.framework.jsengine.JsEngineException: org.mozilla.javascript.EcmaError: ReferenceError: “getComponentsFromGroup” is not defined. (CMP_MANAGER.getDataSourcesFromGroup()#3) at com.sap.ip.bi.zen.rt.framework.jsengine.rhino.RhinoJsEngine.handleError(RhinoJsEngine.java:194) at com.sap.ip.bi.zen.rt.framework.jsengine.rhino.RhinoJsEngine.doRunScript(RhinoJsEngine.java:88) at com.sap.ip.bi.zen.rt.framework.jsengine.AbstractJsEngine.runScript(AbstractJsEngine.java:12) at com.sap.ip.bi.zen.rt.framework.jsengine.rhino.RhinoJsEngine.runScriptWithErrorLogging(RhinoJsEngine.java:106) at com.sap.ip.bi.zen.rt.framework.jsengine.rhino.RhinoScriptInterpreterBialService.runScript(RhinoScriptInterpreterBialService.java:182) at com.sap.ip.bi.zen.rt.framework.jsengine.rhino.RhinoScriptInterpreterBialService.interprete(RhinoScriptInterpreterBialService.java:136) at com.sap.ip.bi.base.command.impl.Command.interprete(Command.java:191) at com.sap.ip.bi.webapplications.runtime.impl.page.Page.processScriptCommand(Page.java:4067) at com.sap.ip.bi.webapplications.runtime.impl.page.Page.processCommandSequence(Page.java:3872) at com.sap.ip.bi.webapplications.runtime.impl.page.Page.doProcessRequest(Page.java:2105) at com.sap.ip.bi.webapplications.runtime.impl.page.Page._processRequest(Page.java:670) at com.sap.ip.bi.webapplications.runtime.impl.page.Page.processRequest(Page.java:4332) at com.sap.ip.bi.webapplications.runtime.impl.page.Page.processRequest(Page.java:4324) at com.sap.ip.bi.webapplications.runtime.impl.controller.Controller.doProcessRequest(Controller.java:1241) at com.sap.ip.bi.webapplications.runtime.impl.controller.Controller._processRequest(Controller.java:1095) at com.sap.ip.bi.webapplications.runtime.impl.controller.Controller.processRequest(Controller.java:1061) at com.sap.ip.bi.webapplications.runtime.impl.controller.Controller.processRequest(Controller.java:1) at com.sap.ip.bi.server.runtime.sevice.impl.BIRuntimeServerService._handleRequest(BIRuntimeServerService.java:519) at com.sap.ip.bi.server.runtime.sevice.impl.BIRuntimeServerService.handleRequest(BIRuntimeServerService.java:967) at com.sap.ip.bi.server.execution.engine.runtime.LocalBIExecutionService.executeRequest(LocalBIExecutionService.java:34) at com.sap.ip.bi.zen.rt.client.handler.designer.LocalExecutionAdapter.executeRequest(LocalExecutionAdapter.java:39) at com.sap.ip.bi.zen.rt.client.handler.RuntimeRequestHandler.handleRequest(RuntimeRequestHandler.java:28) at com.sap.ip.bi.zen.rt.client.handler.designer.DesignerRuntimeRequestHandler.handleRequest(DesignerRuntimeRequestHandler.java:33) at com.sap.ip.bi.zen.rt.client.handler.MainHandler.executeBiRequest(MainHandler.java:69) at com.sap.ip.bi.zen.rt.client.handler.MainHandler.handleRegularRequest(MainHandler.java:57) at com.sap.ip.bi.zen.rt.client.handler.MainHandler.handleRequest(MainHandler.java:35) at com.sap.ip.bi.zen.rt.client.handler.PathHandler.handleRequest(PathHandler.java:54) at com.sap.ip.bi.zen.rt.client.handler.designer.DesignerPathHandler.handleRequest(DesignerPathHandler.java:56) at com.sap.ip.bi.zen.rt.client.handler.AbstractSupportabilityHandler.handleRequest(AbstractSupportabilityHandler.java:25) at com.sap.ip.bi.zen.rt.client.handler.AbstractFrontServlet.handleRequest(AbstractFrontServlet.java:73) at com.sap.ip.bi.zen.rt.client.handler.AbstractFrontServlet.handleRequest(AbstractFrontServlet.java:29) at com.sap.ip.bi.zen.rt.client.handler.AbstractFrontServlet.doPost(AbstractFrontServlet.java:24) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at com.sap.ip.bi.zen.rt.client.handler.AbstractFrontServlet.service(AbstractFrontServlet.java:66) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl$LegacyServlet.service(HttpServiceRuntimeImpl.java:1232) at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153) at org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:50) at com.sap.ip.bi.zen.webserver.designer.ZenSessionFilter.doFilter(ZenSessionFilter.java:57) at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl$LegacyFilterFactory$LegacyFilter.doFilter(HttpServiceRuntimeImpl.java:1191) at org.eclipse.equinox.http.servlet.internal.registration.FilterRegistration.doFilter(FilterRegistration.java:118) at org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:45) at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:71) at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:98) at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl.doDispatch(HttpServiceRuntimeImpl.java:372) at org.eclipse.equinox.http.servlet.internal.servlet.ProxyServlet.service(ProxyServlet.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:357) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:499) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:808) Caused by: org.mozilla.javascript.EcmaError: ReferenceError: “getComponentsFromGroup” is not defined. (CMP_MANAGER.getDataSourcesFromGroup()#3) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3687) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3665) at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3750) at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1794) at org.mozilla.javascript.ScriptRuntime.getNameFunctionAndThis(ScriptRuntime.java:2188) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1308) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394) at com.sap.ip.bi.zen.rt.framework.jsengine.rhino.CustomContextFactory.doTopCall(CustomContextFactory.java:77) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091) at org.mozilla.javascript.Context.callFunctionWithContinuations(Context.java:1172) at org.mozilla.javascript.Context.executeScriptWithContinuations(Context.java:1139) at com.sap.ip.bi.zen.rt.framework.jsengine.rhino.RhinoJsEngine.doRunScript(RhinoJsEngine.java:78) … 62 more

`

mikezaschka commented 6 years ago

Hi Mike, any update on this?

Kind Regards, Mike

entmike commented 6 years ago

On the first issue, this appears to be because SAP decided to give Panel components a different type now. In Design Studio 1.x, Panels were technically also 'Component' type. This changed in 2.x to where they are now 'Panel' type. I think I have a rather simple fix if I provide a new function that simply casts the Panel as a 'Component' again, so that the function will accept it.

How about if I gave you a conversion function to cast the Panel as a Component so that the functions work as they used to?

screen shot 2017-12-07 at 6 47 47 pm

Would this new function work OK for you?

entmike commented 6 years ago

And on second issue, I've fixed this one also, I believe.

mikezaschka commented 6 years ago

Thanks a lot, Mike. First local tests worked fine. I will try to test It with the clients dashboards and close this issue if everything works fine as well.

entmike commented 6 years ago

Sounds good, @mikezaschka. Sorry for the delay! Happy Holidays if we do not chat again before!