SWF-1082 - SelectionTrackingActionListener throws NPE when component's parent is null
This commit is contained in:
@@ -58,7 +58,7 @@ public class SelectionTrackingActionListener implements ActionListener {
|
|||||||
private void trackSelection(UIComponent component) {
|
private void trackSelection(UIComponent component) {
|
||||||
// Find parent component with a SelectionAware model if it exists
|
// Find parent component with a SelectionAware model if it exists
|
||||||
UIComponent currentComponent = component;
|
UIComponent currentComponent = component;
|
||||||
while (!(currentComponent.getParent() instanceof UIViewRoot)) {
|
while (currentComponent.getParent() != null && !(currentComponent.getParent() instanceof UIViewRoot)) {
|
||||||
UIComponent parent = currentComponent.getParent();
|
UIComponent parent = currentComponent.getParent();
|
||||||
Method valueAccessor = ReflectionUtils.findMethod(parent.getClass(), "getValue");
|
Method valueAccessor = ReflectionUtils.findMethod(parent.getClass(), "getValue");
|
||||||
if (valueAccessor != null) {
|
if (valueAccessor != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user