Author: dan.j.allen
Date: 2009-04-03 00:34:41 -0400 (Fri, 03 Apr 2009)
New Revision: 10282
Modified:
trunk/ui/src/main/java/org/jboss/seam/ui/component/UIToken.java
Log:
fix infinite loop searching for parent form
Modified: trunk/ui/src/main/java/org/jboss/seam/ui/component/UIToken.java
===================================================================
--- trunk/ui/src/main/java/org/jboss/seam/ui/component/UIToken.java 2009-04-03 04:18:49
UTC (rev 10281)
+++ trunk/ui/src/main/java/org/jboss/seam/ui/component/UIToken.java 2009-04-03 04:34:41
UTC (rev 10282)
@@ -1,5 +1,6 @@
package org.jboss.seam.ui.component;
+import javax.faces.component.UIComponent;
import javax.faces.component.UIForm;
import javax.faces.component.UIOutput;
@@ -112,10 +113,12 @@
}
public UIForm getParentForm() {
- while (getParent() != null) {
- if (getParent() instanceof UIForm) {
- return (UIForm) getParent();
+ UIComponent parent = getParent();
+ while (parent != null) {
+ if (parent instanceof UIForm) {
+ return (UIForm) parent;
}
+ parent = parent.getParent();
}
return null;