Author: nbelaevski
Date: 2010-05-21 10:33:37 -0400 (Fri, 21 May 2010)
New Revision: 17179
Modified:
root/core/trunk/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java
root/core/trunk/impl/src/main/resources/META-INF/resources/skinning_classes.ecss
root/examples/core-demo/trunk/src/main/webapp/WEB-INF/web.xml
Log:
https://jira.jboss.org/browse/RF-8677
Fixed CSS syntax error in skinning_classes.ecss
Modified:
root/core/trunk/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java
===================================================================
---
root/core/trunk/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java 2010-05-21
14:25:57 UTC (rev 17178)
+++
root/core/trunk/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java 2010-05-21
14:33:37 UTC (rev 17179)
@@ -47,12 +47,10 @@
* If is it equals "true" , framework should proparate exception to
client-side.
*/
public static final String HANDLE_VIEW_EXPIRED_ON_CLIENT =
"org.ajax4jsf.handleViewExpiredOnClient";
- public static final String STD_CONTROLS_SKINNING_PARAM =
"org.richfaces.CONTROL_SKINNING";
- public static final String STD_CONTROLS_SKINNING_CLASSES_PARAM =
"org.richfaces.CONTROL_SKINNING_CLASSES";
+ public static final String STD_CONTROLS_SKINNING_PARAM =
"org.richfaces.ENABLE_CONTROL_SKINNING";
+ public static final String STD_CONTROLS_SKINNING_CLASSES_PARAM =
"org.richfaces.ENABLE_CONTROL_SKINNING_CLASSES";
public static final String[] GLOBAL_QUEUE_ENABLED =
{"org.richfaces.queue.enabled"};
- private static final String ENABLE = "enable";
-
private static final String INIT_PARAM_PREFIX =
ContextInitParameters.class.getSimpleName() + ":";
private static final Object NULL = new Object() {
@@ -100,7 +98,7 @@
*/
public static boolean isStandardControlSkinningEnabled(FacesContext context) {
String paramValue = evaluateInitParameter(context, STD_CONTROLS_SKINNING_PARAM);
- return paramValue == null /* by default it's on */ ||
ENABLE.equals(paramValue);
+ return getBooleanValue(paramValue, true);
}
/**
@@ -110,7 +108,8 @@
* @return value of STD_CONTROLS_SKINNING_CLASSES_PARAM parameter if present.
*/
public static boolean isStandardControlSkinningClassesEnabled(FacesContext context)
{
- return ENABLE.equals(evaluateInitParameter(context,
STD_CONTROLS_SKINNING_CLASSES_PARAM));
+ String paramValue = evaluateInitParameter(context,
STD_CONTROLS_SKINNING_CLASSES_PARAM);
+ return getBooleanValue(paramValue, false);
}
static int getInteger(FacesContext context, String[] paramNames, int defaulValue) {
@@ -163,6 +162,24 @@
return value;
}
+ private static boolean getBooleanValue(Object value, boolean defaultValue) {
+ if (value == null) {
+ return defaultValue;
+ }
+
+ if (value instanceof Boolean) {
+ return ((Boolean) value).booleanValue();
+ }
+
+ String stringValue = (String) value;
+
+ if ("true".equalsIgnoreCase(stringValue) ||
"yes".equalsIgnoreCase(stringValue)) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
private static ConcurrentMap<Object, Object> getExpressionsMap(FacesContext
context) {
ConcurrentMap<Object, Object> concurrentStorage =
ServiceTracker.getConcurrentStorage(context);
return concurrentStorage;
Modified:
root/core/trunk/impl/src/main/resources/META-INF/resources/skinning_classes.ecss
===================================================================
---
root/core/trunk/impl/src/main/resources/META-INF/resources/skinning_classes.ecss 2010-05-21
14:25:57 UTC (rev 17178)
+++
root/core/trunk/impl/src/main/resources/META-INF/resources/skinning_classes.ecss 2010-05-21
14:33:37 UTC (rev 17179)
@@ -299,8 +299,8 @@
.rich-text-control-select{
font-size : '#{richSkin.generalSizeFont}';
- font-family : '#{richSkin.headerFamilyFont};
- color : '#{richSkin.selectControlColor}';
+ font-family : '#{richSkin.headerFamilyFont}';
+ color: '#{richSkin.selectControlColor}';
}
/*gradient styles*/
Modified: root/examples/core-demo/trunk/src/main/webapp/WEB-INF/web.xml
===================================================================
--- root/examples/core-demo/trunk/src/main/webapp/WEB-INF/web.xml 2010-05-21 14:25:57 UTC
(rev 17178)
+++ root/examples/core-demo/trunk/src/main/webapp/WEB-INF/web.xml 2010-05-21 14:33:37 UTC
(rev 17179)
@@ -16,13 +16,13 @@
</context-param>
<context-param>
- <param-name>org.richfaces.CONTROL_SKINNING</param-name>
- <param-value>#{skinBean.enableElementsSkinning ? 'enable' :
''}</param-value>
+ <param-name>org.richfaces.ENABLE_CONTROL_SKINNING</param-name>
+ <param-value>#{skinBean.enableElementsSkinning}</param-value>
</context-param>
<context-param>
- <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>
- <param-value>#{skinBean.enableClassesSkinning ? 'enable' :
''}</param-value>
+ <param-name>org.richfaces.ENABLE_CONTROL_SKINNING_CLASSES</param-name>
+ <param-value>#{skinBean.enableClassesSkinning}</param-value>
</context-param>
<context-param>