I have a dialog thus:
<p:dialog id="pinDialog" widgetVar="pinDialog" width="800" binding="#{userBean.pinCheckDialog}" closable="false" modal="true" closeOnEscape="false" showEffect="clip" hideEffect="clip">
<h:form id="pinEntry">
<p:messages for="messagesForPinCheck"/>
<p:outputLabel for="pinCode" value="#{messages.PinCodeRequired}"/>
<p:inputText value="#{userBean.enteredPin}" size="4" id="pinCode"/>
<p:commandButton value="#{messages.PinCodeSubmit}" update="@form" action="#{userBean.submitPin()}"/>
</h:form>
</p:dialog>
And within a idleMonitor
I am calling active()
and idle()
on the userBean
. If the user goes idle and other conditions hold true I want to show the pinDialog
:
if (isPinRequired()) {
logger.debug("pin required, attempting to show pin dialog");
RequestContext.getCurrentInstance().execute("pinDialog.show()");
}
The log message appears, but nothing happens on screen. I have also tried PF('pinDialog').show
without success. What am I doing wrong?