2

I'm using PF 5.1 + PF Extensions 3.0.0 + OmniFaces 1.8.1 on WAS 8.0.0.10

Trying to make the following example from here <pe:triStateCheckbox/> but listener not called when I change state of a component, neither error is given.

This is my code of JSF page:

<pe:triStateCheckbox style="vertical-align:middle;" value="#{bean.notification}">
    <p:ajax listener="#{bean.toggleNotification}"/>
</pe:triStateCheckbox>

and bean:

private int notification;

public void toggleNotification() {
    System.out.println("toggle");
}

//getters and setters

What may I doing wrong? Thank you.

Tiny
  • 27,221
  • 105
  • 339
  • 599
Anatoly
  • 5,056
  • 9
  • 62
  • 136

1 Answers1

6

Ok, code in a showcase not same code in a real world. Went to github we need to specify the event name:

<pe:triStateCheckbox id="ajaxTriState" value="#{triStateCheckBoxController.value2}">
       <p:ajax event="change"
               update="growl"
               listener="#{triStateCheckBoxController.addMessage}"/>
</pe:triStateCheckbox>
Tiny
  • 27,221
  • 105
  • 339
  • 599
Anatoly
  • 5,056
  • 9
  • 62
  • 136