Author: vbaranov
Date: 2008-03-20 12:44:35 -0400 (Thu, 20 Mar 2008)
New Revision: 7018
Modified:
trunk/framework/api/src/main/java/org/richfaces/skin/SkinFactory.java
Log:
http://jira.jboss.com/jira/browse/RF-995
Modified: trunk/framework/api/src/main/java/org/richfaces/skin/SkinFactory.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/skin/SkinFactory.java 2008-03-20
16:10:17 UTC (rev 7017)
+++ trunk/framework/api/src/main/java/org/richfaces/skin/SkinFactory.java 2008-03-20
16:44:35 UTC (rev 7018)
@@ -116,8 +116,17 @@
}
}
if (instance == null) {
- // TODO - create default instance
-// instance = new SkinFactoryImpl();
+ try{
+ // instantiate default implementation of SkinFactory -
org.richfaces.skin.SkinFactoryImpl,
+ // placed in the richfaces-impl.jar
+ instance = (SkinFactory)
Class.forName(DEFAULT_SKIN_FACTORY_IMPL_CLASS).newInstance();
+ } catch (InstantiationException ie) {
+ log.error(Messages.getMessage(Messages.CREATING_SKIN_FACTORY_ERROR), ie);
+ } catch (IllegalAccessException iae) {
+ log.error(Messages.getMessage(Messages.CREATING_SKIN_FACTORY_ERROR), iae);
+ } catch (ClassNotFoundException cnfe) {
+ log.error(Messages.getMessage(Messages.CREATING_SKIN_FACTORY_ERROR), cnfe);
+ }
}
instances.put(loader, instance);
}
@@ -158,6 +167,11 @@
public static final String SKIN_PARAMETER = "org.richfaces.SKIN";
public static final String BASE_SKIN_PARAMETER = "org.richfaces.BASE_SKIN";
+
+ /**
+ * Full class name of default implementation of the SkinFactory class
+ */
+ public static final String DEFAULT_SKIN_FACTORY_IMPL_CLASS =
"org.richfaces.skin.SkinFactoryImpl";
/**
* Get base {@link Skin} implementation