Help migrating Metawidget from Vaadin 6 to Vaadin 7

Hi guys,

I’m the author of the Open Source component library, Metawidget (http://metawidget.org). Recently a few of our users have expressed an interest in migrating Metawidget from Vaadin 6 to Vaadin 7.

I am giving it a go. So far, everything compiles and all unit tests pass. See: https://github.com/metawidget/metawidget/tree/master/modules/java/vaadin/core

However, our ‘real world’ tests fail with the message:

“Widgetset does not contain implementation for org.metawidget.vaadin.ui.VaadinMetawidget. Check its component connector’s @Connect mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions.”

Metawidget is a purely client-side widget. We never needed a ‘widgetset’ for the Vaadin 6 version (perhaps we should have done? But Vaadin didn’t complain). Could you please help with creating a ‘widgetset’ to suit Vaadin 7? I have read over the docs but they talk about configuring an additional compilation step? As we never needed such a step for Vaadin 6 this all seems very alien to me :frowning:

Regards,

Richard.

Hello.

Can you provide access to the sources of a simple sample application that shows the problem, so I can check it locally?

Thanks,
Michael

Michael,

Thank you so much for offering to help!

Yes, you can download some sources for a (fairly) simple example app here:

https://github.com/metawidget/metawidget/tree/master/examples/java/vaadin

There are 2 apps under that folder. The /vaadin6 one works as intended, the /vaadin one fails with the error I have described. The source for the widget being used is under: https://github.com/metawidget/metawidget/tree/master/modules/java/vaadin/core

Regards,

Richard.

Richard,

sorry it took so long to respond.

I spent some time whenever possible, but eclipse was in the mood to play games with me, so I wasted a lot of time there. Got the project checked out and running now, so I can have a look at it.

Will let you know when I find out something.

Greetings,
Michael

Thanks so much! I wait with baited breath… :slight_smile:

Sorry, but I can’t make any promises about how much time I can spend. But will have a look at it again today.

It seems to me, that you create the additional UI on the server side through server side composition. Is this correct? In that case, indeed a widgetset would not be needed.

Or do you have any client side widgets for your components? When yes, then you need to implement a Connector class, that binds these two together:
https://vaadin.com/wiki/-/wiki/Main/Migrating+from+Vaadin+6+to+Vaadin+7#section-Migrating+from+Vaadin+6+to+Vaadin+7-ClientSideWidgets

Michael,

That is correct. Everything is done using server side composition and so no widgetset is needed. Vaadin 6 seemed to use DefaultWidgetSet implicitly, and never complained. It ‘just worked’.

How can I set up Vaadin 7 to have this same behaviour?

Regards,

Richard.

Hello Ricard.

Ok. Then this looks like a bug to me. Please create a ticket for it. Someone more knowledgeable than mee about the internals of Vaadin needs to look at this.

Regards,
Michael

Okay opened as: http://dev.vaadin.com/ticket/11650

Hello Richard.

Sorry for giving you the wrong information. I was discussing this with a colleague of mine, and he was also sure it should work as you have implemented it.

So looks like you need to create a Connector class and add a @Connect annotation, as described in the migration guide (link is above)

Again, sorry for the confusion

Michael,

No need to apologise! I appreciate all your help in trying to resolve this.

I’m having a hard time understanding the Migration Guide. I’m fine to “create a connector class for the add-on” and “Extend LegacyConnector, override the getWidget() method”. But then I come unstuck because in Vaadin 6 I never used @ClientWidget or super.updateFromUIDL or did anything with a ‘V’ component (such as VMyWidget or VLabel).

Could you please explain how the Migration Guide steps relate to my situation?

Regards,

Richard.

Thank you Richard.

Here is a tutorial to create a container based on the AbstractComponentContainer that you are also using. Hope this helps:
https://vaadin.com/wiki/-/wiki/Main/Creating%20a%20simple%20component%20container

Greetings,
Michael