Author: pete.muir(a)jboss.org
Date: 2008-04-28 11:01:17 -0400 (Mon, 28 Apr 2008)
New Revision: 8048
Modified:
trunk/ui/src/main/java/org/jboss/seam/ui/component/UIFragment.java
Log:
newInstance support
Modified: trunk/ui/src/main/java/org/jboss/seam/ui/component/UIFragment.java
===================================================================
--- trunk/ui/src/main/java/org/jboss/seam/ui/component/UIFragment.java 2008-04-28 14:03:12
UTC (rev 8047)
+++ trunk/ui/src/main/java/org/jboss/seam/ui/component/UIFragment.java 2008-04-28 15:01:17
UTC (rev 8048)
@@ -22,6 +22,7 @@
package org.jboss.seam.ui.component;
import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
/**
* JSF component class
@@ -35,4 +36,8 @@
@SuppressWarnings("unused")
private static final String COMPONENT_FAMILY =
"org.jboss.seam.ui.Fragment";
+ public static UIFragment newInstance() {
+ return (UIFragment)
FacesContext.getCurrentInstance().getApplication().createComponent(COMPONENT_TYPE);
+ }
+
}