[jboss-cvs] jboss-seam/ui/src/main/java/org/jboss/seam/ui/component ...
Peter Muir
peter at bleepbleep.org.uk
Thu Jun 21 07:52:13 EDT 2007
User: pmuir
Date: 07/06/21 07:52:13
Modified: ui/src/main/java/org/jboss/seam/ui/component
UILoadStyle.java
Log:
Fix UILoadStyle
Revision Changes Path
1.4 +10 -1 jboss-seam/ui/src/main/java/org/jboss/seam/ui/component/UILoadStyle.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: UILoadStyle.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/ui/src/main/java/org/jboss/seam/ui/component/UILoadStyle.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- UILoadStyle.java 21 Jun 2007 10:56:48 -0000 1.3
+++ UILoadStyle.java 21 Jun 2007 11:52:13 -0000 1.4
@@ -11,6 +11,7 @@
import org.jboss.seam.navigation.Pages;
import org.jboss.seam.ui.resource.StyleResource;
import org.jboss.seam.ui.util.UrlBuilder;
+import org.jboss.seam.util.Reflections;
public abstract class UILoadStyle extends HtmlLoadStyle
{
@@ -68,7 +69,15 @@
}
public static UILoadStyle newInstance() {
- return (UILoadStyle) FacesContext.getCurrentInstance().getApplication().createComponent(COMPONENT_TYPE);
+ // Avoid runtime dep on a4j
+ try
+ {
+ return (UILoadStyle) Reflections.classForName("org.jboss.seam.ui.component.html.HtmlLoadStyle").newInstance();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Error loading UILoadStyle");
+ }
}
}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list