Making comments for an Entity

Hi…
How to create comments like template system to an Entity? I want to implement comments for every entity instance… Can anybody suggest me?

Hi,

I created an example of exactly that in here: https://github.com/balvi/cuba-example-declarative-comments

Perhaps ill make it a app component if there is demand for it :slight_smile:

Bye
Mario

1 Like

Thanks Mario… The code was written in Groovy… Is it possible to get the code in Java? It will be very useful… Thanks…

Hi Mario…
I managed to import all the groovy scripts into my project. I followed all the
procedure… But i am getting an error

Cannot resolve symbol ‘BrowseAnnotationExecutor’. But i configured gradle properly with the maven
i.e.,

    maven {
        url  "https://dl.bintray.com/balvi/cuba-components"
    }

Bu the declarativecontrollers jar file is not loaded in my project. But it is loaded in the declarative controller sample project. Please help me regarding this…

Hi Mario…
After updating into maintenance version of the Cuba platform… The Jar files is been added… Now i’m getting the following NullPointerException error… When opening the browser window which extends the AnnotatableAbstractLookup window…

java.lang.NullPointerException
at de.balvi.cuba.declarativecontrollers.web.browse.AnnotatableAbstractLookup.init(AnnotatableAbstractLookup.java:19)
at com.haulmont.cuba.gui.WindowManager.init(WindowManager.java:1238)
at com.haulmont.cuba.gui.WindowManager.initWrapperFrame(WindowManager.java:1227)
at com.haulmont.cuba.gui.WindowManager.createWindow(WindowManager.java:582)
at com.haulmont.cuba.gui.WindowManager.openWindow(WindowManager.java:751)
at com.haulmont.cuba.web.WebWindowManager.openWindow(WebWindowManager.java:147)
at com.haulmont.cuba.gui.config.MenuCommand$ScreenCommand.run(MenuCommand.java:181)
at com.haulmont.cuba.gui.config.MenuCommand.execute(MenuCommand.java:76)
at com.haulmont.cuba.web.sys.MenuBuilder.lambda$createMenuBarCommand$0(MenuBuilder.java:176)
at com.haulmont.cuba.web.gui.components.mainwindow.WebAppMenu$MenuItemImpl.lambda$setCommand$2434f46b$1(WebAppMenu.java:338)
at com.vaadin.ui.MenuBar.changeVariables(MenuBar.java:212)
at com.vaadin.server.communication.ServerRpcHandler.changeVariables(ServerRpcHandler.java:623)
at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:470)
at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:413)
at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:274)
at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:90)
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1435)
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:361)
at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:301)
at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:192)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
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:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.haulmont.cuba.web.sys.CubaHttpFilter.handleNotFiltered(CubaHttpFilter.java:116)
at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:103)
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:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)