Questions asked by hieulamhttps://answers.axonivy.com/questions/asked-by/911/hieulam/?type=rssQuestions asked by <a href="/users/911/hieulam" >hieulam</a>enWed, 04 Dec 2019 04:53:52 -0500How to call HTML dialog's method from javahttps://answers.axonivy.com/questions/4230/how-to-call-html-dialog-s-method-from-java<p>Dear Ivy team I would like to know is there any way to trigger a HTML dialog from java code. Lets me describe the situation: I have a page that contains a method named "run" <img alt="alt text" src="https://answers.axonivy.com/upfiles/2019-12-04_16h47_35.png"></p> <p>In HTML view I have a button to call a method from backing bean "Bean" <img alt="alt text" src="https://answers.axonivy.com/upfiles/2019-12-04_16h48_42.png"> Now what we need to how to trigger method "run" from the backing bean <img alt="alt text" src="https://answers.axonivy.com/upfiles/2019-12-04_16h49_17_Xq1duAv.png"></p> <p>We can achieve this only when the method belongs to an Ivy component by using something like this <img alt="alt text" src="https://answers.axonivy.com/upfiles/2019-12-04_16h52_34.png"> Unfortunately, this way only work for Ivy's component, not for the page. So my question is do we have any way to call HTML dialog's method from java?</p>hieulamWed, 04 Dec 2019 04:53:52 -0500https://answers.axonivy.com/questions/4230/how-to-call-html-dialog-s-method-from-javahtmldialogivyIvy task with start link Ivy is not persisted immediatelyhttps://answers.axonivy.com/questions/4112/ivy-task-with-start-link-ivy-is-not-persisted-immediately<p>Dear Ivy team.</p> <p>At the moment, we're facing the problem with start link ivy is marked as <strong>Persist task on creation</strong> come with some additional data what was set in <strong>customvarcharfield</strong>.</p> <p>We create a trigger in our ivy's database to listen to any changes in <code>iwa_task</code> table. We saw that whenever a user starts that ivy link. ivy will insert a new record in table <strong>iwa_task</strong> with a <em>taskid</em> but the value for <code>customvarchar1 is empty</code>, very quickly after that, ivy also performs another update on the same task to update data for customvarchar. After 2 updates in the iwa_task table, we have the correct data with a task that is created come with customvarcharfield.</p> <p>It works pretty well for single user because the delay time between 2 updates is very short and unnoticeable. But when there are many users are working at the same time, we got the problem. Because each user access the Portal's tasklist at the same time, so they will query the existing tasks in the system. But under some unluckily moment, the task is created (at the first stage without customvarchar) is queried and return to other user's results. Without customvarchar means the task data is not displayed properly.</p> <p>I just wonder is there any way to make "Persist task on creation" is persisted only once with full of data instead of creating an empty task and update data later?</p> <p>Thank in advanced.</p>hieulamFri, 18 Oct 2019 00:27:09 -0400https://answers.axonivy.com/questions/4112/ivy-task-with-start-link-ivy-is-not-persisted-immediatelytaskivyMigrate Primface Push from Ivy 6.3 to Ivy 7.0.3https://answers.axonivy.com/questions/3165/migrate-primface-push-from-ivy-6-3-to-ivy-7-0-3<p>Hi all. Currently, we're migrating our projects from Ivy 6.3 to Ivy 7.0.3. One of the problems we're facing is PrimePush doesn't work anymore in Chrome but still works in Internet Explorer and FireFox. Previously this feature works on all browsers<br> We followed this instruction to implement PrimeFacePush for Ivy 6.3: <a href="https://answers.axonivy.com/questions/10/can-i-use-primepush-in-xpert-ivy">https://answers.axonivy.com/questions/10/can-i-use-primepush-in-xpert-ivy</a><br> Error in Chrome when the page is loaded:<img alt="alt text" src="https://answers.axonivy.com/upfiles/Screenshot_6.png"></p> <p>Log file: <code>11:11:51.568 WARN [org.atmosphere.cpr.DefaultBroadcaster] [http-nio-8081-exec-7] [requestId=209574] Duplicate resource 562f3a7e-8900-4c5c-89f7-4689843ccbf2. Could be caused by a dead connection not detected by your server. Replacing the old one with the fresh one 11:11:51.568 WARN [org.apache.catalina.connector.Request] [http-nio-8081-exec-7] [requestId=209574] Unable to start async because the following classes in the processing chain do not support async [org.primefaces.push.PushServlet] java.lang.IllegalStateException: A filter or servlet of the current chain does not support asynchronous operations. at org.apache.catalina.connector.Request.startAsync(Request.java:1665) at org.apache.catalina.connector.RequestFacade.startAsync(RequestFacade.java:1038) at org.atmosphere.cpr.AtmosphereRequestImpl.startAsync(AtmosphereRequestImpl.java:631) at org.atmosphere.container.Servlet30CometSupport.suspend(Servlet30CometSupport.java:95) at org.atmosphere.container.Servlet30CometSupport.service(Servlet30CometSupport.java:70) at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2287) at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:191) at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:177) at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) 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 ch.ivyteam.ivy.webserver.internal.startup.IvyEngineUnavailableFilter.doFilter(IvyEngineUnavailableFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:89) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:135) 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:198) 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:80) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at ch.ivyteam.ivy.webserver.internal.PerformanceLogValve.invoke(PerformanceLogValve.java:55) 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:1457) 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) 11:11:51.568 ERROR [org.atmosphere.cpr.AtmosphereFramework] [http-nio-8081-exec-7] [requestId=209574] AtmosphereFramework exception java.lang.IllegalStateException: A filter or servlet of the current chain does not support asynchronous operations. at org.apache.catalina.connector.Request.startAsync(Request.java:1665) at org.apache.catalina.connector.RequestFacade.startAsync(RequestFacade.java:1038) at org.atmosphere.cpr.AtmosphereRequestImpl.startAsync(AtmosphereRequestImpl.java:631) at org.atmosphere.container.Servlet30CometSupport.suspend(Servlet30CometSupport.java:95) at org.atmosphere.container.Servlet30CometSupport.service(Servlet30CometSupport.java:70) at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2287) at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:191) at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:177) at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) 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 ch.ivyteam.ivy.webserver.internal.startup.IvyEngineUnavailableFilter.doFilter(IvyEngineUnavailableFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:89) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:135) 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:198) 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:80) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at ch.ivyteam.ivy.webserver.internal.PerformanceLogValve.invoke(PerformanceLogValve.java:55) 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:1457) 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)</code><br> Hope I can get your help!</p>hieulamThu, 29 Mar 2018 23:52:07 -0400https://answers.axonivy.com/questions/3165/migrate-primface-push-from-ivy-6-3-to-ivy-7-0-3primepushivy7xprimefaces