mgwt

How to import mgwt in UiBinder


mgwt project website suggests using the following import statement in UiBinder:

xmlns:mgwt="urn:import:com.googlecode.mgwt.ui.client.widget"

It does not work, however, because every widget is in a separate package. I can make an individual widget work by changing the import statement:

xmlns:mgwt="urn:import:com.googlecode.mgwt.ui.client.widget.carousel"

but this is obviously inconvenient. The wildcard does not work in this import statement. Is there a better way of importing mgwt in UiBinder?


Solution

  • The package organization has changed since mGWT 2 and the website is not up-to-date with the last versions. However, you can still use the import suggested by the website :

    xmlns:mgwt="urn:import:com.googlecode.mgwt.ui.client.widget"
    

    But you will need to use the widgets like this :

    <mgwt:package-name:widget-name>
        ....
    </mgwt:package-name:widget-name>
    

    For instance :

    <mgwt:carousel.Carousel>
        ...
    </mgwt:carousel.Carousel>