From 1295b656d44e60cbedb38855e0304e1eb62eec28 Mon Sep 17 00:00:00 2001 From: Bernard Labno Date: Mon, 12 Dec 2011 19:21:03 +0000 Subject: [PATCH] Fix to UIFocus --- src/main/java/org/richfaces/component/UIFocus.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/richfaces/component/UIFocus.java b/src/main/java/org/richfaces/component/UIFocus.java index 5831592..b2d76c3 100644 --- a/src/main/java/org/richfaces/component/UIFocus.java +++ b/src/main/java/org/richfaces/component/UIFocus.java @@ -5,11 +5,7 @@ import javax.faces.component.UIComponentBase; import javax.faces.component.UIForm; import javax.faces.component.UIInput; import javax.faces.context.FacesContext; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; +import java.util.*; public abstract class UIFocus extends UIComponentBase { // ------------------------------ FIELDS ------------------------------ @@ -80,7 +76,10 @@ public abstract class UIFocus extends UIComponentBase { Set allowedClientIds = new HashSet(); Iterator clientIdsWithMessages = getFacesContext().getClientIdsWithMessages(); while (clientIdsWithMessages.hasNext()) { - allowedClientIds.add(clientIdsWithMessages.next()); + final String clientId = clientIdsWithMessages.next(); + if (clientId != null) { + allowedClientIds.add(clientId); + } } final List inputs = new ArrayList(); getInputs(getParentForm(this), allowedClientIds, inputs); -- libgit2 0.24.0