Search code examples
imagegwtdefaultuibinder

How does one define TITLE text of an IMAGE in GWT UiBinder?


I'm using GWT Messages for i18n.

In a ui.xml file I define:

<g:Image ui:field="logo" url="img.png">
<ui:attribute name='title' ui:description='tooltip for image'/>
</g:Image>

On app start-up the GWT environment complains: The enclosing element needs to provide a default value for attribute "title"

I can't find any mention about adding a default value to the . Do you know how?


Solution

  • Figured it out!

    It's not an attribute missing on ui:attribute! Simply add title='the default text' to the g:Image tag.