myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Veit Guna (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (MYFACES-1156) Model update uses empty string instead of null. Custom String converter not possible.
Date Sun, 26 Feb 2006 12:53:57 GMT
    [ http://issues.apache.org/jira/browse/MYFACES-1156?page=comments#action_12367821 ] 

Veit Guna commented on MYFACES-1156:
------------------------------------

Sorry, I forgot to mention, that using a custom String converter doesn't work.

--cut here--
        Class valueType = vb.getType(facesContext);
        if (valueType == null) return null;

        if (String.class.equals(valueType)) return null;    //No converter needed for String
type
        if (Object.class.equals(valueType)) return null;    //There is no converter for Object
class
--cut here--


> Model update uses empty string instead of null. Custom String converter not possible.
> -------------------------------------------------------------------------------------
>
>          Key: MYFACES-1156
>          URL: http://issues.apache.org/jira/browse/MYFACES-1156
>      Project: MyFaces Core
>         Type: Improvement
>     Versions: 1.1.2-SNAPSHOT
>  Environment: Windows XP SP2, Tomcat 5.5, Myfaces 1.1.2-SNAPSHOT, Hibernate 3.1.2, Facelets
0.8
>     Reporter: Veit Guna

>
> I've encountered a problem using String values with myfaces. The default behavior of
myfaces (probably jsf?) seems to be, that Input values of type String
> get converted to an empty String (""). Instead I would like to have a null value updated
in my model. This is because I don't want to have
> empty Strings in my DB - but nulls.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message