System should not refresh after clicking on already selected radio button -


i have 2 radio buttons , selected 1 them , there ajax call when select , want there should not ajax call when click on selected radio button . how implement this.

    <label for="cooperativeauthorisedrepresentativetype">#{msg['com.crimsonlogic.egov.rol.rnra.landsubdivision.applicantdetails.cooperative.cooperativeauthorisedrepresentativetype']}</label>     <h:selectoneradio id="applicantdetails_cooperative_cooperativeauthorisedrepresentativetype" required="true"             value="#{landsubdivisioncontroller.cooperativedetails.repcode}" requiredmessage="#{cmn['rol.common.message.error.radio_required']}" >             <f:selectitem itemlabel="#{msg['reprwand']}" itemvalue="reprwand" />             <f:selectitem itemlabel="#{msg['repfor']}" itemvalue="repfor" />             <f:validaterequired />             <a4j:ajax event="click" listener="#{landsubdivisioncontroller.changerepresentativetypeforcooperative()}" render="cooperativecitizennationalid,cooperativecitizennationalidforfranchisee,cooperativecitizensurname,cooperativecitizenothernames,cooperativecitizendistrict,cooperativecitizensector,cooperativecitizencell,cooperativecitizenvillage,cooperativeforeignerpassportno,cooperativeforeignersurname,cooperativeforeignerothernames,cooperativeforeignercountry,cooperativeforeignercity"  />     </h:selectoneradio>     <div class="col-md-4">         <h:message for="applicantdetails_cooperative_cooperativeauthorisedrepresentativetype" styleclass="help-block"></h:message>     </div> 

you should use change event instead of click event of javascript.

you can try writing this: <a4j:ajax event="change"


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -