I'm trying to use Primefaces' poll feature to open a dialog box every 30 seconds. I previously got the poll to call a growl and show some data, but for some reason even though the code to open the dialog has been called, the dialog box just doesn't open.
I know the backing bean function to open the dialog works because I tested it with a button instead of poll, so I'm not sure exactly what is happening here.
Here is where I am calling poll:
<p:poll interval="30" listener="#{eventBean.openNote}" />
And here is my code in the backing bean:
public void openNote() {
RequestContext context = RequestContext.getCurrentInstance();
context.openDialog("notedisplay");
}
Here is the code I used when testing it with a button:
<p:commandLink id="btnSearch" value="Event"
actionListener="#{eventBean.openNote}"
style="margin-right:10px">
</p:commandLink>