Author: konstantin.mishin
Date: 2011-01-25 14:12:58 -0500 (Tue, 25 Jan 2011)
New Revision: 21224
Modified:
trunk/ui/common/ui/src/main/java/org/richfaces/component/util/InputUtils.java
trunk/ui/common/ui/src/main/java/org/richfaces/component/util/SelectUtils.java
Log:
RF-10171
Modified: trunk/ui/common/ui/src/main/java/org/richfaces/component/util/InputUtils.java
===================================================================
---
trunk/ui/common/ui/src/main/java/org/richfaces/component/util/InputUtils.java 2011-01-25
18:11:23 UTC (rev 21223)
+++
trunk/ui/common/ui/src/main/java/org/richfaces/component/util/InputUtils.java 2011-01-25
19:12:58 UTC (rev 21224)
@@ -72,12 +72,15 @@
if ((converter == null) && (valueExpression != null)) {
Class converterType = valueExpression.getType(context.getELContext());
- if ((converterType == null) || (converterType == Object.class) ||
(converterType == String.class)) {
+ if ((converterType == null) || (converterType == Object.class)) {
return newValue;
} else {
converter = context.getApplication().createConverter(converterType);
if (converter == null) {
+ if (String.class.equals(converterType)) {
+ return newValue;
+ }
throw new
ConverterException(Messages.getMessage(Messages.NO_CONVERTER_FOUND_ERROR,
converterType.getName()));
}
Modified: trunk/ui/common/ui/src/main/java/org/richfaces/component/util/SelectUtils.java
===================================================================
---
trunk/ui/common/ui/src/main/java/org/richfaces/component/util/SelectUtils.java 2011-01-25
18:11:23 UTC (rev 21223)
+++
trunk/ui/common/ui/src/main/java/org/richfaces/component/util/SelectUtils.java 2011-01-25
19:12:58 UTC (rev 21224)
@@ -293,13 +293,13 @@
if (ve != null) {
Class<?> valueType = ve.getType(facesContext.getELContext());
- if ((valueType == null) || String.class.equals(valueType) ||
Object.class.equals(valueType)) {
+ if ((valueType == null) || Object.class.equals(valueType)) {
// No converter needed
} else {
converter =
facesContext.getApplication().createConverter(valueType);
- if (converter == null) {
+ if (converter == null && !String.class.equals(valueType)) {
throw new
ConverterException(Messages.getMessage(Messages.NO_CONVERTER_FOUND_ERROR,
valueType.getName()));
}
@@ -320,7 +320,7 @@
if (ve != null) {
Class<?> valueType = ve.getType(facesContext.getELContext());
- if ((valueType == null) || String.class.equals(valueType) ||
Object.class.equals(valueType)) {
+ if ((valueType == null) || Object.class.equals(valueType)) {
// No converter needed
} else {
converter =
facesContext.getApplication().createConverter(valueType);