The difference is in how your string is created.
I would make a guess that getValue() returns null at some point and
the call to toString() generates a NPE type error in javascript.
Concatenation like in your second snippet, will create a new string
and concatenate the return of getValue(). Null is okay to
concatenate.

To verify, do a check for null or look for "null in your output.


On May 24, 8:05 am, Yulia <yuli...@gmail.com> wrote:
> After all day beating my head against the keybord I found where the
> problem was. I reverted all changes to stable version and statrted to
> add code bit by bit and noticed that after changes in
> AttributeValue.toString() method my program started to fail again.
>
> This code doesn't work:
>     @Override
>     public String toString() {
>         return getValue().toString();
>     }
>
> But this code works:
>     @Override
>     public String toString() {
>         return ""+getValue();
>     }
>
> But it should be the same... Maybe I misunderstand something, can
> somebody explain me the difference?

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

Reply via email to