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/11/22 09:16:07 UTC
svn commit: r478079 -
/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/_ComponentUtils.java
Author: matzew
Date: Wed Nov 22 00:16:07 2006
New Revision: 478079
URL: http://svn.apache.org/viewvc?view=rev&rev=478079
Log:
delegate to RendererUtils.findNestingForm (see MYFACES-1496)
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=478079&r1=478078&r2=478079
==============================================================================
--- 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 Wed Nov 22 00:16:07 2006
@@ -19,10 +19,10 @@
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;
+import org.apache.myfaces.shared.renderkit.RendererUtils;
import org.apache.myfaces.shared.renderkit.html.util.FormInfo;
/**
@@ -51,30 +51,12 @@
return null;
}
- private static final String TRINIDAD_FORM_COMPONENT_FAMILY = "org.apache.myfaces.trinidad.Form";
- private static final String ADF_FORM_COMPONENT_FAMILY = "oracle.adf.Form";
-
/**
*
* @deprecated use <code>RendererUtils.findNestingForm</code> instead
*/
public static FormInfo findNestingForm(UIComponent uiComponent, FacesContext facesContext)
{
- UIComponent parent = uiComponent.getParent();
- while (parent != null && (!ADF_FORM_COMPONENT_FAMILY.equals(parent.getFamily()) &&
- !TRINIDAD_FORM_COMPONENT_FAMILY.equals(parent.getFamily()) &&
- !(parent instanceof UIForm)))
- {
- parent = parent.getParent();
- }
-
- if (parent != null)
- {
- //link is nested inside a form
- String formName = parent.getClientId(facesContext);
- return new FormInfo(parent, formName);
- }
-
- return null;
+ return RendererUtils.findNestingForm(uiComponent, facesContext);
}
}