views:

31

answers:

1

I'm using an AbsolutePanel to do some drag-and-drop kind of stuff. I add child Widgets to the AbsolutePanel, and then use absolutePanel.setWidgetPosition to set their position.

But I keep getting this error:

java.lang.IllegalStateException: com.google.gwt.user.client.ui.AbsolutePanel is missing CSS 'position:{relative,absolute,fixed}'

the stack trace points right to the setWidgetPosition call.

BUT! Not only have I already called absolutePanel.getElement.getStyle().setPosition(Position.RELATIVE), I have also applied a style name with a position: relative attribute. When I inspect the element with FireBug, it has a style attribute with "position: absolute" right in it, presumably overriding everything else.

How can I get rid of this warning?

The actual behavior seems to be working fine, but maybe I'm missing something.

+2  A: 

It seems to be a bug in GWT:

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

Peter Knego