Update of /var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/typehandler In directory james.mmbase.org:/tmp/cvs-serv32650
Modified Files: StringHandler.java Log Message: The whole excercise with 'interpretEmptyAsNull' is pretty pointless of course, if we cast it to empty string again in the final step. So avoiding that. If a string field can contain NULL, and you make it empty, it becomes NULL See also: http://cvs.mmbase.org/viewcvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/typehandler Index: StringHandler.java =================================================================== RCS file: /var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/typehandler/StringHandler.java,v retrieving revision 1.70 retrieving revision 1.71 diff -u -b -r1.70 -r1.71 --- StringHandler.java 3 Mar 2009 19:35:58 -0000 1.70 +++ StringHandler.java 3 Mar 2009 20:27:40 -0000 1.71 @@ -29,7 +29,7 @@ * @author Gerard van de Looi * @author Michiel Meeuwissen * @since MMBase-1.6 - * @version $Id: StringHandler.java,v 1.70 2009/03/03 19:35:58 michiel Exp $ + * @version $Id: StringHandler.java,v 1.71 2009/03/03 20:27:40 michiel Exp $ */ public class StringHandler extends AbstractTypeHandler { @@ -120,7 +120,8 @@ @Override protected void setValue(Node node, String fieldName, Object value) { - node.setStringValue(fieldName, org.mmbase.util.Casting.toString(value)); + String string = value == null ? null : org.mmbase.util.Casting.toString(value); + node.setStringValue(fieldName, string); } @Override protected Object getValue(Node node, String fieldName) { _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs