I'd like to call a process event from the idlemonitor tag. when I do

<p:idleMonitor timeout="5000"  onidle="#{logic.onIdle}" />

I get the following error : javax.el.PropertyNotFoundException: Property 'onIdle' not found on type com.sun.proxy.$Proxy118

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.

here is the dialog.

            <p:dialog widgetVar="idleDialog" modal="true"
                header="Période d'inactivité écoulée"
                style="width: 300px">
                <p:panelGrid columns="1">
                    <p:outputLabel>
                        <p>Cette page est demeurée inactive pour plus de 20 minutes. </p>
                        <p>Votre demande a été enregistrée et conservée dans vos tâches.</p> 
                    </p:outputLabel>
                    <p:commandButton actionListener="#{logic.onIdle}" onclick="PF('idleDialog').hide()"
                        value="#{ivy.cms.co('/label/demande/continue')}" />
                </p:panelGrid>
            </p:dialog>

asked 30.11.2015 at 20:23

enricojl's gravatar image

enricojl
(suspended)
accept rate: 0%

edited 02.12.2015 at 09:32

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
9.4k31958


You can call dialog logic if start a method instead of an event like this:

<p:idleMonitor timeout="5000">
      <p:ajax event="idle" listener="#{logic.idle()}" update="form" />
</p:idleMonitor>

monitor screenshot

link

answered 01.12.2015 at 09:54

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
9.4k31958
accept rate: 70%

edited 01.12.2015 at 09:55

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?

link

answered 02.12.2015 at 04:05

enricojl's gravatar image

enricojl
(suspended)
accept rate: 0%

edited 02.12.2015 at 04:07

here is the code to update the form or anything prior to the call to the logic.

            <p:idleMonitor timeout="5000"  >
                <p:ajax event="idle" listener="#{logic.onIdle}"  process="mainForm" />
            </p:idleMonitor>

solved.

link

answered 03.12.2015 at 22:49

enricojl's gravatar image

enricojl
(suspended)
accept rate: 0%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×14

Asked: 30.11.2015 at 20:23

Seen: 5,530 times

Last updated: 04.12.2015 at 08:39