Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: EE-3.0.0.GA, 3.1
-
Fix Version/s: EE-3.0.0.GA_P01, 3.2
-
Component/s: Framework
-
Labels:None
-
Environment:N/A
Description
Currently DomBasicRenderer.java class does not support detection of global String converters in an application. It is designed in such way that it always returns a String value before detecting a global custom String converter. (line 205@ DomBasicRenderer.java)
201 if (converter == null) {
202 if (currentValue == null) {
203 return "";
204 } else if (currentValue instanceof String) {
205 return (String) currentValue;
206 }
207
208 converter = getConverterForClass(currentValue.getClass());
209
210 if (converter == null) {
211 return currentValue.toString();
212 }
213 }
a fix below is proposed by one of our clients to allow detection of such converters in application:
...
if (converter == null) {
if (currentValue == null) {
return "";
} else if (currentValue instanceof String) {
// Addition for global String converter detection.
converter = getConverterForClass(currentValue.getClass());
if (converter == null) {
return (String) currentValue;
} else {
return converter.getAsString(facesContext, uiComponent, currentValue);
}
}
converter = getConverterForClass(currentValue.getClass());
if (converter == null) {
return currentValue.toString();
}
}
...
We need to review proposed fix and determine if it can be safely incorporated into our code.
201 if (converter == null) {
202 if (currentValue == null) {
203 return "";
204 } else if (currentValue instanceof String) {
205 return (String) currentValue;
206 }
207
208 converter = getConverterForClass(currentValue.getClass());
209
210 if (converter == null) {
211 return currentValue.toString();
212 }
213 }
a fix below is proposed by one of our clients to allow detection of such converters in application:
...
if (converter == null) {
if (currentValue == null) {
return "";
} else if (currentValue instanceof String) {
// Addition for global String converter detection.
converter = getConverterForClass(currentValue.getClass());
if (converter == null) {
return (String) currentValue;
} else {
return converter.getAsString(facesContext, uiComponent, currentValue);
}
}
converter = getConverterForClass(currentValue.getClass());
if (converter == null) {
return currentValue.toString();
}
}
...
We need to review proposed fix and determine if it can be safely incorporated into our code.
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion