Author: nbelaevski
Date: 2009-04-23 19:00:54 -0400 (Thu, 23 Apr 2009)
New Revision: 13807
Modified:
trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java
Log:
https://jira.jboss.org/jira/browse/RF-6788
Modified:
trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java
===================================================================
---
trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java 2009-04-23
18:19:47 UTC (rev 13806)
+++
trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java 2009-04-23
23:00:54 UTC (rev 13807)
@@ -28,6 +28,7 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
+import javax.faces.convert.ConverterException;
import javax.faces.model.SelectItem;
import org.ajax4jsf.javascript.JSFunctionDefinition;
@@ -109,7 +110,7 @@
Map <String,String> request =
context.getExternalContext().getRequestParameterMap();
String newValue = (String) request.get(clientId);
- if (newValue != null && newValue.length()!= 0) {
+ if (newValue != null) {
inplaceSelect.setSubmittedValue(newValue);
} else {
inplaceSelect.setSubmittedValue(null);
@@ -207,6 +208,15 @@
return false;
}
+ @Override
+ public Object getConvertedValue(FacesContext context, UIComponent component, Object
submittedValue) throws ConverterException {
+ if ("".equals(submittedValue)) {
+ return null;
+ } else {
+ return InputUtils.getConvertedValue(context, component, submittedValue);
+ }
+ }
+
protected Class<? extends UIComponent> getComponentClass() {
return UIInplaceSelect.class;
}