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

Custom control doesn't work after upgrade to Pega 7.1.7 from 6.1

SA-10522

Summary



The issue is related to a custom radio button control that displays images to indicate whether the button is selected. This radio button, when used in a section also has an click action associated with it. The click action is meant to refresh the section and call an activity before refreshing the section.
 
Currently, the refresh action does not get invoked. Tracer shows that the activity is not being called, in addition the screen is not refreshed, whereas the behaviour in Pega 6.1 causes the screen to refresh and the activity to run.


Clearly, the pre-activity in the refresh click event is not being invoked.
 

Error Messages



None. 

Steps to Reproduce



1. In PRPC 6.1 SP1, add a custom control to display radiobuttons in a section and configure it to refresh the section and execute an activity when clicked.
2. Export your application to Pega 7.1.7 and run the flow.


Root Cause



The custom control had the Pega RadioButton control included in it.
 
The root cause of this issue is the change in the way RadioButton control generates the ID for the INPUT tag in Pega 7.
 
Previously, the RadioButton control generated id for <input> tag based on pyLabel.
Following is the logic
 
strCells[i][j] = ((i == 0) ? "<tr>" : "") + "<td><input id='"+    strReferenceName+StringUtils.crossScriptingFilter(cbpRow.getString("pyLabel")) +"' type='radio' name='"+strReferenceName+"' value='"+
                                StringUtils.crossScriptingFilter(cbpRow.getString("pyFieldValue"))+"' class='Radio'"+
                                ((cbpRow.getString("pyFieldValue").equals(strValue))?" checked":"")+" style='vertical-align: middle;'
 
But in 7.1 this has been changed, here ID will be generated based on property name.
 
<input id='" + strPropName.replace(".","") +StringUtils.crossScriptingFilter(radioValue)+ "' type='radio' name='" + strReferenceName + "' value='"
                                            + StringUtils.crossScriptingFilter(radioValue) + "' class='Radio'"
                                            + ((radioValue.equals(strValue)) ? " checked" : "") + " style='vertical-align: middle;'>"

 

Resolution



It is advisable to use Pega default RadioButton control instead of a custom control.

The custom control has been modified to include the 'id' instead 'pyLabel:

document.getElementById(\""+strReferenceName+StringUtils.crossScriptingFilter(cbpRow.getString("pyLabel")) was replaced by doc
ument.getElementById(\""+id+"\");  

Published June 12, 2015 - 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?

Want to help us improve this content?

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
Contact us