Author: abelevich
Date: 2010-12-14 11:40:34 -0500 (Tue, 14 Dec 2010)
New Revision: 20562
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/behavior/ToggleControl.java
Log:
fix possible ClassCastException
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/behavior/ToggleControl.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/component/behavior/ToggleControl.java 2010-12-14
16:36:59 UTC (rev 20561)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/behavior/ToggleControl.java 2010-12-14
16:40:34 UTC (rev 20562)
@@ -22,6 +22,7 @@
package org.richfaces.component.behavior;
+import javax.el.ExpressionFactory;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
import javax.faces.component.behavior.ClientBehaviorContext;
@@ -137,7 +138,8 @@
} else if (compare(PropertyKeys.targetPanel, name)) {
setTargetPanel((String) value);
} else if (compare(PropertyKeys.disableDefault, name)) {
- setDisableDefault((Boolean)value);
+ ExpressionFactory expFactory =
getFacesContext().getApplication().getExpressionFactory();
+ setDisableDefault((Boolean)expFactory.coerceToType(value, Boolean.class));
}
}
}