Saturday, September 27, 2014

Re: How to effectively add Constants values into a ListBox in GWT?

You could store your keys separately in a list or use an "enum Country". Once you know all the keys you could use ConstantsWithLookup and fill your listbox using a for loop, e.g.

for(Country country : Country.values()) {

Alternatively you could probably implement an annotation processor that generates the addItem() code based on the methods defined in your constants interface.

-- J.

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment