Support Article
Incorrect behaviour of Set Focus in Repeat Grid
SA-7644
Summary
Customer is using "Down key" in Repeat Grid and set actions as "Set Focus (Next Item), Run Data Transform (Page: Auto)" and when pressing down key it is not moving to next item sometimes.Sometimes it works fine,sometimes not.
Steps to Reproduce
- Open section ChooseNewProduct
- In Repeat Grid set Actions for "Down key" event: Set Focus (Next Item), Run Data Transform (Page: Auto).
- Initialize this event.
- Run flow AddProduct
- Press Down key in Grid
Root Cause
The root cause of this problem is the way the code is written.
Resolution
This issue is resolved through by writing java code in activity without using Data tansform for down key:-
String ref = tools.getStepPage().getReference();
int index = Integer.parseInt(ref.split("[\\(\\)]")[1]);
if(tools.getStepPage().getTopLevelPage().getProperty("pxResults").size() > index) {
ClipboardPage sourcePage = tools.getStepPage().getTopLevelPage().getProperty("pxResults").getPropertyValue(index + 1).getPageValue();
ClipboardPage targetPage = tools.findPage("SelectedProduct", false);
if(targetPage == null) {
targetPage = tools.createPage(sourcePage.getClassName(), "SelectedProduct");
}
targetPage.clear();
targetPage.putAll(sourcePage, ClipboardPage.PUTALL_KEEPNEW);
}
Published January 31, 2016 - 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.