I\'ve got some some troubles with Primefaces 3.2 and JSF 2.1.
My Code like this:
Try this
Bean.java
@ManagedBean
@ViewScoped
public class Bean {
public String testButtonAction() {
System.out.println("testButtonAction invoked");
return "anotherPage.xhtml";
}
public void testButtonActionListener(ActionEvent event) {
System.out.println("testButtonActionListener invoked");
}
}
page.xhtml
<p:toolbar>
<p:toolbarGroup>
<p:commandButton action="#{bean.testButtonAction}"/>
<p:commandButton actionListener="#{bean.testButtonActionListener}"/>
</p:toolbarGroup>
</p:toolbar>