google-code-export / gwt-test-utils

Automatically exported from code.google.com/p/gwt-test-utils
1 stars 0 forks source link

Support for IsWidget #73

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create an UiBinder widget like this (omitting 'header') -
<g:HTMLPanel>
 <my:IHeader />
</g:HTMLPanel>

Where my:IHeader is defined as:
interface IHeader extends IsWidget {}
I don't really care about header implementation (we could or could not use 
UiBinder for it, doesn't really matter). 'my:Header' is provided in widget's 
constructor.

What is the expected output? What do you see instead?
I expect gwt-test-utils to 'generate' a widget. Instead, an exception is 
thrown, because 'my:IHeader' is not extending 'Widget', but 'IsWidget' instead 
(extract from UiBinderTagBuilder):

   if (Widget.class.isAssignableFrom(clazz)) {
        // create or get the instance
        Widget widget = getInstance((Class<? extends Widget>) clazz, attributes);

        return new UiBinderWidget<Widget>(widget, attributes, parentTag, owner,
            resourceManager);
      } else {
        throw new GwtTestUiBinderException("Not managed type in file '"
            + owner.getClass().getSimpleName() + ".ui.xml"
            + "', only subclass of '" + Widget.class.getName()
            + "' are managed");
      }

What version of the product are you using? On what operating system?
0.33-snapshot

Original issue reported on code.google.com by alex.dob...@gmail.com on 16 Sep 2011 at 8:35

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 16 Sep 2011 at 8:43

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 17 Sep 2011 at 12:09

GoogleCodeExporter commented 9 years ago
Fixed on the lastest snapshots I've just deployed !

Could you please try again and give me some feedback so I could close the issue 
?

Original comment by gael.laz...@gmail.com on 17 Sep 2011 at 1:12

GoogleCodeExporter commented 9 years ago
What rev? Is it for gwt2.4 (0.34)?

Original comment by alex.dob...@gmail.com on 19 Sep 2011 at 8:30

GoogleCodeExporter commented 9 years ago
0.34, 0.33 and 0.28.7

Original comment by gael.laz...@gmail.com on 19 Sep 2011 at 8:35

GoogleCodeExporter commented 9 years ago
it works, thanks.

Original comment by alex.dob...@gmail.com on 19 Sep 2011 at 1:42

GoogleCodeExporter commented 9 years ago
it works, thanks.

Original comment by alex.dob...@gmail.com on 19 Sep 2011 at 1:42

GoogleCodeExporter commented 9 years ago
sorry for double post, don't know how that happened

Original comment by alex.dob...@gmail.com on 19 Sep 2011 at 1:43

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 19 Sep 2011 at 1:51