Custom control doesn't work after upgrade to Pega 7.1.7 from 6.1
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.
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.
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='"+
((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;'>"
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 document.getElementById(\""+id+"\");
0% found this useful