I am having trouble because I have a method in Java, I need the function to receive 2 values, String and ItemSelectEvent because I use the same funciton several times.
How can I send the event from the XHTML?
Here's how I tried to do it:
<p:chart type="donut" model="#{bean.donut}">
<p:ajax event="itemSelect" listener="#{bean.createModel("P", event)}"
update="grap"/>
</p:chart>
The bean method:
public void createModel(String str, ItemSelectEvent event){
...
}
But the method always receives the "event" as null, only receives the event when I call it like this
<p:chart type="donut" model="#{bean.donut}">
<p:ajax event="itemSelect" listener="#{bean.createModel}"
update="grap"/>
</p:chart>
Bean
public void createModel(ItemSelectEvent event){
...
}
But i need it to send the extra String, thanks in advance