<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: how to use PrimeFaces idleMonitor?</title><link>https://answers.axonivy.com/questions/1567/how-to-use-primefaces-idlemonitor</link><description>&lt;p&gt;I'd like to call a process event from the idlemonitor tag.  when I do &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;p:idleMonitor timeout="5000"  onidle="#{logic.onIdle}" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I get the following error :
javax.el.PropertyNotFoundException: Property 'onIdle' not found on type com.sun.proxy.$Proxy118&lt;/p&gt;
&lt;p&gt;I can't seem to get access to logic... inside the idelMonitor but if I open a dialog and press a button, it works; but I want to call the logic.method before the user has to click any button.  is it possible.&lt;/p&gt;
&lt;p&gt;here is the dialog.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;            &amp;lt;p:dialog widgetVar="idleDialog" modal="true"
                header="Période d'inactivité écoulée"
                style="width: 300px"&amp;gt;
                &amp;lt;p:panelGrid columns="1"&amp;gt;
                    &amp;lt;p:outputLabel&amp;gt;
                        &amp;lt;p&amp;gt;Cette page est demeurée inactive pour plus de 20 minutes. &amp;lt;/p&amp;gt;
                        &amp;lt;p&amp;gt;Votre demande a été enregistrée et conservée dans vos tâches.&amp;lt;/p&amp;gt; 
                    &amp;lt;/p:outputLabel&amp;gt;
                    &amp;lt;p:commandButton actionListener="#{logic.onIdle}" onclick="PF('idleDialog').hide()"
                        value="#{ivy.cms.co('/label/demande/continue')}" /&amp;gt;
                &amp;lt;/p:panelGrid&amp;gt;
            &amp;lt;/p:dialog&amp;gt;
&lt;/code&gt;&lt;/pre&gt;</description><atom:link href="https://answers.axonivy.com/questions/1567/how-to-use-primefaces-idlemonitor" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 03 Dec 2015 22:49:51 -0500</lastBuildDate><item><title>Answer by enricojl</title><link>https://answers.axonivy.com/questions/1567/how-to-use-primefaces-idlemonitor/1578</link><description>&lt;p&gt;here is the code to update the form or anything prior to the call to the logic.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;            &amp;lt;p:idleMonitor timeout="5000"  &amp;gt;
                &amp;lt;p:ajax event="idle" listener="#{logic.onIdle}"  process="mainForm" /&amp;gt;
            &amp;lt;/p:idleMonitor&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;solved.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">enricojl</dc:creator><pubDate>Thu, 03 Dec 2015 22:49:51 -0500</pubDate><guid>https://answers.axonivy.com/questions/1567/how-to-use-primefaces-idlemonitor/1578</guid></item><item><title>Answer by enricojl</title><link>https://answers.axonivy.com/questions/1567/how-to-use-primefaces-idlemonitor/1573</link><description>&lt;p&gt;thanks it worked.  I was able to call my process.  I wanted to save the form data before closing the dialog.  but the data aren't pushed to the server when the process save the data.  is it possible to update the form before the call to the listener?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">enricojl</dc:creator><pubDate>Wed, 02 Dec 2015 04:05:07 -0500</pubDate><guid>https://answers.axonivy.com/questions/1567/how-to-use-primefaces-idlemonitor/1573</guid></item><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/1567/how-to-use-primefaces-idlemonitor/1570</link><description>&lt;p&gt;You can call dialog logic if start a method instead of an event like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;p:idleMonitor timeout="5000"&amp;gt;
      &amp;lt;p:ajax event="idle" listener="#{logic.idle()}" update="form" /&amp;gt;
&amp;lt;/p:idleMonitor&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img alt="monitor screenshot" src="http://answers.axonivy.com/upfiles/idleMonitor_C7Qcf9w.png"&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Tue, 01 Dec 2015 09:54:50 -0500</pubDate><guid>https://answers.axonivy.com/questions/1567/how-to-use-primefaces-idlemonitor/1570</guid></item></channel></rss>