How to fix reselecting the SelectOneButton issue?

Viewed 1388

I am developing an application using Primefaces 6.1 and JSF 2.2.

In that, I am facing an issue is on Primefaces selectOneButton component, when I was clicking on an already selected selectOneButton value "Level 1", it's getting unselectable automatically without triggering a model method.

Sample code:

<p:panel id="mainPagePanelId">  // It is a main panel
<p:selectOneButton value="#{action.chooseLevelType}">
   <f:selectItem id="one" itemLabel="Level1" itemValue="0" />
   <f:selectItem id="two" itemLabel="Level2" itemValue="1" />
   <p:ajax event="change" update="mainPagePanelId" 
   listener="#{action.triggerMthd}" process="panelId"/>
</p:selectOneButton>
</p:panel>

Actual:

Here, The "Level 1" button is selected value, If I am again selecting on that same value, then it gets unselected value like a below Bug screen shot.

enter image description here

Bug:

enter image description here

This bug is not present in Primefaces 5.1. Kindly suggest me to solve this bug.

1 Answers
Related