Tuesday, March 1, 2011

Re: Editor with ListBox in UiBinder

I'm not sure about your Article/Category model and the extension of ProxyRenderer but here is how I use ValueListBox in my editors:

// Defining a ValueListBox which holds country name in my pojo
@UiField(provided = true)
ValueListBox<String> country;

// Creating the ValueListBox
country = new ValueListBox<String>(new Renderer<String>()
{
@Override
public String render(String object)
{
return object;
}

@Override
public void render(String object, Appendable appendable) throws IOException
{
}
});

// Adding values to the ValueListBox
country.setAcceptableValues(/*list of Strings*/);

This example works fine for me..

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment