How do I add items to GWT ListBox in Uibinder .ui.xml template ?

Kasturi picture Kasturi · Jun 14, 2010 · Viewed 23.4k times · Source

How to add the listbox items using UiBinder?

Answer

Jla picture Jla · Jun 15, 2010

It is possible since february 2011 version:

http://code.google.com/p/google-web-toolkit/issues/detail?id=4654

Following this patch you are now able to add items following this syntax:

<g:ListBox>
  <g:item value='1'>
    first item
  </g:item>
  <g:item value='2'>
    second item
  </g:item>
</g:ListBox>