4

I am using UiBinder xml files in a GWT project. The problem is that Eclipse doesn't give me any info about what attribute I can use with the widgets

For example I know I can set width or style this way :

<g:HorizontalPanel width="100%" addStyleNames="{style.mainPanel}">

But they are not mentioned in the list that appears after clicking ctrl + space. So I don't know what other options I have. How can I get them ?

More generally I find it hard to find complete documentation on what we can do in the UiBinder. Which leads to spending a lot of time to find how to deal with simple features like this one Has anybody got any good links.

Community
  • 1
  • 1
Jla
  • 11,304
  • 14
  • 61
  • 84

2 Answers2

2

Any attribute you pass, is converted to a method call on the object according to some naming guidelines:

  • width="100%" --> this will call setWidth("100%")
  • addStyleNames=".." --> setAddStyleNames(...) does not exist, so GWT will search for an operation with that name: addStyleNames

If you follow these guidelines, you can check the Javadocs to see which operations can be executed.

If you are using GWT 2.1.0, you can have a look at the GWT Designer plugin for Eclipse. I have not used it yet, but I expect it to do the necessary.-

Jan
  • 1,306
  • 2
  • 10
  • 25
1

I haven't looked around for some third party tutorials/insights, since I found the ones provided by Google sufficient:

Community
  • 1
  • 1
Igor Klimer
  • 15,321
  • 3
  • 47
  • 57