4

I'm trying to update content in a JSF 2.0 webapp without refreshing the entire page.

This is my xhtml

<h:form id="form">  
    <h:outputText id="txt_count" value="#{counterBean.count}" />  

    <p:poll interval="3"   
            listener="#{counterBean.increment}" update="txt_count" />  
</h:form>  

And my bean

package org.primefaces.examples.view;  

import java.io.Serializable;  

import javax.faces.event.ActionEvent;  

public class CounterBean implements Serializable{  

    private int count;  

    public int getCount() {  
        return count;  
    }  

    public void setCount(int count) {  
        this.count = count;  
    }  

    public void increment() {  
        count++;  
    }  
}  

This compiles fine but when it runs I get the following error:

ERROR: MAC did not verify!

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
user2229544
  • 477
  • 2
  • 10
  • 23

0 Answers0