Support Article
pySelected is true in all the other pages
SA-32055
Summary
User has a Grid where it includes pySelected to select all the work objects. Clicking on the next page, it appears pySelected is still selected in the header, which should not be selected.
Error Messages
Not applicable
Steps to Reproduce
1) Open MyWork from the left navigation menu items.
2) In the worklist items, include a checkbox pySelected to select all.
3) Select that checkbox in first page all the work items will be selected. Now click on next page pySelected in true (check box is checked in the other page as well) which should not happen.
Root Cause
This is an expected behavior. pxCheckBox Select All does not work with pagination in repeating grids.
Resolution
As a local change add below code as java step in pyPreGridUpdate activity. (when param.gridAction=="PAGINATE")
String page = tools.getParamValue("pzPrimaryPageName");
tools.findPage(page).getProperty("pySelected").setValue("true");
int startIndex = Integer.parseInt(tools.getParamValue("startIndex"));
int endIndex = Integer.parseInt(tools.getParamValue("startIndex")) + Integer.parseInt(tools.getParamValue("pyPageSize")) - 1;
boolean loopThrough = false;
if(endIndex>=startIndex){
loopThrough = true;
}
while(loopThrough){
String pySelected = myStepPage.getPage("pxResults("+startIndex+")").getString("pySelected");
if(!pySelected.equals("true")){
String page1 = tools.getParamValue("pzPrimaryPageName");
tools.findPage(page1).getProperty("pySelected").setValue("false");
break;
}
if(startIndex>=endIndex){
break;
}
startIndex++;
}
Published January 5, 2017 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.