0

Following is the ajax i used on the checkbox

<h:panelGrid columns="2" style="width: 100%" columnClasses="eighty-percent top-alignment, twenty-percent top-alignment">
<p:panel id="checkBoxNameOnePannel" styleClass="noBorderPanel">
                                    <h:selectBooleanCheckbox id="checkBoxNameOne" value="#{formIllinoisStateW4Controller.checkBoxNameOne}" >
                                        <p:ajax event="change" execute="@this" listener="#{formIllinoisStateW4Controller.handleEvent}" update="formName:elementOne formName:elementTwo"/>
                                    </h:selectBooleanCheckbox>
                                    <p:outputLabel value="#{msgs['pro.form.illinois.statew4.step1.paragraph1']}" escape="false"/> 
                                </p:panel>
                            </h:panelGrid>  

and this is my method handler in jsf controller

public void handleEvent(AjaxBehaviorEvent event) {......}

but it is not working as expected and it works like

when i click the first checkbox the event is not fired but when i click on the second element than the event is fired and i get the first time clicked element's value where i am supposed to get second element's value.

i am not able to find the issue and could someone help me as what is the mistake i make here?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Joe
  • 4,460
  • 19
  • 60
  • 106
  • @BalusC Thanks and is it fine to use event="change" for the text box value change? – Joe Nov 30 '16 at 10:16
  • @BalusC the following also works fine one time and does not work second time. would you please help me to fix – Joe Nov 30 '16 at 10:29

0 Answers0