Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Change event does not work correctly with pxRadioButton

SA-50572

Summary



Change event does not work correctly with pxRadioButton.
On configuring a change event on the pxRadioButton control with a refresh section action, it reloads and invokes an activity every time the radio button is clicked. However, the value does not change.



Error Messages



Not Applicable


Steps to Reproduce

  1. Configure a pxRadioButton with an OnChange event to refresh the section calling an activity.
  2. Click the same value or radio button. The activity is invoked and the section is refreshed each time.


Root Cause



Until Pega 7.2.1, data click was generated even for change actions. However, from Pega 7.2.2, data change is generated for change events.


Resolution



Perform the following local-change in the section with a radio group:

Configure a non-autogenerated section and add the below script.

<script> 
$(document).ready(function(){ 
$(".radioTable").click(function(){ 
var eventEle = pega.util.Event.getTarget(event);
var tabElem = eventEle.parentNode.parentNode.parentNode if(eventEle.tagName=="LABEL"){ 
if($(eventEle).siblings("input").prop("checked")){ 
event.cancelBehavior = true; 
event.stopPropagation(); 



}); 
}); 
</script>



 

Published September 8, 2018 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice