Agree. But the TextBox, as far as I saw in the code, turns nulls into empty
strings. So it must be the editor framework. Unfortunately this one gets
generated, so it is a black box to me right now. Have to dig deeper in the
gwt code.

The problem is: it would be easy to workaround the issue, but it would leave
me not understanding what is wrong with my code. What did I do to break it?
Variable names? Wrong order in initializing something? I don't know.

Papick G. Taboada
+++
   pgt technology scouting GmbH
   http://pgt.de


Am 19.08.2011 um 20:44 schrieb Jens <[email protected]>:

I think your code seems fine and although I didn't dig through GWTs source
code I found it totally legal to have null values for empty fields. I mean
if you assume the object you edit goes (at some time) into the database then
I think its desirable to store null (= nothing) into the database instead of
"empty data".

So I do think its not a bug. Its just how the default TextBox editor
implementation (The ValueBoxEditor:
http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/editor/ui/client/adapters/ValueBoxEditor.java)
handles
empty data.

And the difference you see between ValueBoxBase<T> and TextBoxBase is
because ValueBoxBase<T> operates on any data type T and if you do not know
the type you have to return null in case of an empty String in the wrapped
input element. Only subclasses of ValueBoxBase<T> can decide if something
like an "empty T" exists and thats why TextBoxBase converts null back to an
empty String. An IntegerBox for example cant do that (an empty Integer does
not exist) and thus it returns null.

-- J.

-- 
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-web-toolkit/-/OeNePO10hssJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to