[seam-commits] Seam SVN: r14336 - in branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam: mock and 1 other directory.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Tue Feb 28 09:01:23 EST 2012
Author: maschmid
Date: 2012-02-28 09:01:22 -0500 (Tue, 28 Feb 2012)
New Revision: 14336
Modified:
branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamApplication.java
branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockApplication.java
Log:
add missing createComponent method from jsf2 to SeamApplication and MockApplication
Modified: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamApplication.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamApplication.java 2012-02-28 13:59:49 UTC (rev 14335)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamApplication.java 2012-02-28 14:01:22 UTC (rev 14336)
@@ -14,6 +14,7 @@
import javax.faces.FacesException;
import javax.faces.application.Application;
import javax.faces.application.NavigationHandler;
+import javax.faces.application.Resource;
import javax.faces.application.StateManager;
import javax.faces.application.ViewHandler;
import javax.faces.component.UIComponent;
@@ -99,6 +100,19 @@
{
return application.createComponent(componentBinding, context, componentType);
}
+
+ @Override
+ public UIComponent createComponent(FacesContext context,
+ String componentType, String rendererType)
+ {
+ return application.createComponent(context, componentType, rendererType);
+ }
+
+ @Override
+ public UIComponent createComponent(FacesContext context, Resource resource)
+ {
+ return application.createComponent(context, resource);
+ }
@Override
public Converter createConverter(String converterId)
Modified: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockApplication.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockApplication.java 2012-02-28 13:59:49 UTC (rev 14335)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/mock/MockApplication.java 2012-02-28 14:01:22 UTC (rev 14336)
@@ -267,11 +267,11 @@
{
try
{
- return (UIComponent) Class.forName(name).newInstance();
+ return (UIComponent) Thread.currentThread().getContextClassLoader().loadClass(name).newInstance();
}
catch (Exception e)
- {
- throw new UnsupportedOperationException("Unable to create component " + name);
+ {
+ throw new UnsupportedOperationException("Unable to create component " + name, e);
}
}
else
@@ -280,6 +280,12 @@
return new UIOutput();
}
}
+
+ @Override
+ public UIComponent createComponent(FacesContext context, String componentType, String rendererType)
+ {
+ return createComponent(componentType);
+ }
@Override
public UIComponent createComponent(ValueBinding vb, FacesContext fc, String x)
More information about the seam-commits
mailing list