-
Bug
-
Resolution: Obsolete
-
Neutral
-
5.4.7
-
None
-
None
-
-
Empty show more show less
-
Saigon 91, Saigon 92
-
1
Step to reproduce:
- Prepare 1 dialog definition has 3 tabs that the second and the third tab has only 1 required field. dialog-show-all.png
- Open that dialog
- Doesn't need to input anything and click Save button
Output: Can see the correct error number but clicking to "Jump to next error" doesn't jump any where clicking-to-jump-to-next-error-but-nothing-happens.png even the second tab and the third tab has error second-tab-error.pngthird-tab-error.png
Problem: comes from FormSection.getNextProblematicField(Connector) function
public Component getNextProblematicField(Connector currentFocused) { int startIndex = components.indexOf(currentFocused) + 1; if (startIndex < components.size() - 1) { while (startIndex < components.size()) { Component c = components.get(startIndex++); if (c instanceof AbstractField && !((AbstractField<?>) c).isValid()) { return c; } } } return null; }
The if condition if (startIndex < components.size() - 1) is incorrect for the case: tab has only one field. startIndex is 0 and (components.size() - 1) is 0 also. So can't find the invalid component as expected
Acceptance criteria
- is related to
-
MGNLUI-3640 "Jump to next error" causes NullPointerException when on "Show all" tab
- Closed