Hi Thomas, I was hoping you would see this as I've read your blog posts and
answers on SO but am still confused.
This is the first time I've used the Editor framework The address is a
sub-editor of Person, which is simply being created on an onBind() of a
test presenter I'm using:
PersonPresenter:
@Override
protected void onBind()
{
super.onBind();
// this would be replaced with a call to datastore
Address address = new Address("447a Archway Road", "Highgate", "N6 4HT",
"Scotland"); // Scotland is the state
Person person = new Person("1", "Drew", "Spencer", address);
getView().edit(person);
}
Surely if I am instantiating the object this way then the state will return
with the value? I tried setting the acceptable values before the initwidget
call but that gives a nullpointerexception.
Am totally confused :/
On Wednesday, 5 September 2012 15:11:30 UTC+1, Thomas Broyer wrote:
>
>
>
> On Wednesday, September 5, 2012 12:54:52 PM UTC+2, Drew Spencer wrote:
>>
>> Hi,
>>
>> I created a list of the 4 strings, called setAcceptableValues(list) in
>> the connstructor, but now I get the 4 values in the list, plus a null
>> entry. What am I doing wrong?
>>
>
> If there's a 'null' entry that you didn't add in the "acceptable values",
> then it means setValue(null) was called, i.e. you're editing an Address
> whose getState() returns 'null'.
>
--
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/-/J9CakPHEvRIJ.
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.