I am trying to work with the p:poll JSF tag, and using a code sample I found on the net. But I keep getting an error. The system doesn’t seem to find the property ‘increment’, although it exists in the bean.
I use the following:
<h:outputText id="txt_count" value="#{navBean.count}" />
<p:poll actionListener="#{navBean.increment}" interval="1000" update="txt_count" />
It is inside a view, and form, like this:
<f:view>
<h:form>
with the appropriate closing tags. When I hit it, it generates a Property ‘increment’ not found on type com.roberts.ui.NavBean
The increment method is there:
public void increment(ActionEvent actionEvent) {
count++;
}
What am I doing wrong?
I finally got around to doing this. Here’s a full description & code:
Download the latest prime faces from here: http://www.primefaces.org/downloads.html
Get the documentation pdf, 3.0.RC2, from here:
http://www.primefaces.org/documentation.html
The xmlns for this latest release is: xmlns:p=”http://primefaces.org/ui”
In the xhtml file (for doing the poll every 3 seconds):
In the CounterBean:
That’s all. It works flawlessly.