You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2006/09/25 07:15:02 UTC
svn commit: r449575 -
/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/_ComponentUtils.java
Author: matzew
Date: Sun Sep 24 22:15:02 2006
New Revision: 449575
URL: http://svn.apache.org/viewvc?view=rev&rev=449575
Log:
MYFACES-1422. using instanceof UIForm and Trinidad/ADF family for testing the *JSF Form* components
Modified:
myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/_ComponentUtils.java
Modified: myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/_ComponentUtils.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/_ComponentUtils.java?view=diff&rev=449575&r1=449574&r2=449575
==============================================================================
--- myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/_ComponentUtils.java (original)
+++ myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/_ComponentUtils.java Sun Sep 24 22:15:02 2006
@@ -16,6 +16,7 @@
package org.apache.myfaces.shared.util;
import javax.faces.component.UIComponent;
+import javax.faces.component.UIForm;
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;
@@ -42,18 +43,15 @@
return null;
}
- private static final String FORM_COMPONENT_FAMILY = "javax.faces.Form";
- private static final String STRUTS_FACES_COMPONENT_FAMILY = "org.apache.struts.faces.Form";
private static final String TRINIDAD_FORM_COMPONENT_FAMILY = "org.apache.myfaces.trinidad.Form";
private static final String ADF_FORM_COMPONENT_FAMILY = "oracle.adf.Form";
public static FormInfo findNestingForm(UIComponent uiComponent, FacesContext facesContext)
{
UIComponent parent = uiComponent.getParent();
- while (parent != null && (!FORM_COMPONENT_FAMILY.equals(parent.getFamily()) &&
- !ADF_FORM_COMPONENT_FAMILY.equals(parent.getFamily()) &&
- !STRUTS_FACES_COMPONENT_FAMILY.equals(parent.getFamily()) &&
- !TRINIDAD_FORM_COMPONENT_FAMILY.equals(parent.getFamily())))
+ while (parent != null && (!ADF_FORM_COMPONENT_FAMILY.equals(parent.getFamily()) &&
+ !TRINIDAD_FORM_COMPONENT_FAMILY.equals(parent.getFamily()) &&
+ !(parent instanceof UIForm)))
{
parent = parent.getParent();
}