Components Issue in Vaadin 8 When Migrated from Vaadin 7 to Vaadin 8

Hi,

I have Migrated from Vaadin 7 to vaadin 8 but some of the components are not working how to make vaadin 7 components work in vaadin 8

Hi,

Did you read this article in the docs already: https://vaadin.com/docs/v8/framework/migration/migrating-to-vaadin8.html ?

-Olli

yes i have gone through but most of my functionality is breaking like check box having value change listner issue table has been deprecated,entire data property has been deprecated no idea how to over come with this issues need suggestions on this which will be great help

Are you using the compatibility packages?

-Olli

yes i am using the compatibility packages like com.vaadin.v7.data.Property but when i use these it is showing it is deprecated but most of my project is using this kind of imports where if i want to use the same need help on this

Deprecation doesn’t mean you can’t use it right now, it just means that support will be dropped later. In your case you can think of it like this: you can keep using the old com.vaadin.v7.data.Property style data binding until you are ready to migrate to the Vaadin 8 style - the v7 Compatibility packages are supported as long as Vaadin 8 is. The recommended migration pattern is changing one view at a time to Vaadin 8 style until you don’t need the Compatibility packages any longer. You can read more about the new data model here: https://vaadin.com/docs/v8/framework/datamodel/datamodel-overview.html

kk thanks for the rply so i can use the same for all other components in the same way upto we migrated to the components as per your suggestion

That’s the idea of the Compatibility packages. You use them so you have a working application after the version change and then you can slowly move towards the newer versions.

oh kk then we need to write the code according to the latest 8 apis related methods for the functionality once it is fine then we can remove that v7 apis

but i am having issue while compiling the code using maven it is throwing error like cannot find symbol as below :

cannot access com.vaadin.data.Container
[ERROR]
class file for com.vaadin.data.Container not found

these type of errors i am getting during maven build

You need to update your imports. The classes in the Compatibility package have been moved to com.vaadin.v7 , so for example import com.vaadin.data.Container; needs to be import com.vaadin.v7.data.Container;. Look at the chapter “Using The Compatibility Packages” here: https://vaadin.com/docs/v8/framework/migration/migrating-to-vaadin8.html

kk thanks let me try the same as per you above comments thanks for the update

hi one doubt i have as per the document to include both 7 and 8 version compatability in pom.xml we need to define the below can you update me

com.vaadin vaadin-compatibility-server 8.0.0

or

com.vaadin vaadin-compatibility-server 8.0.0

which one i need to define for vaadin 7 to work can you suggest me so that i can work on it

com.vaadin vaadin-server 8.0.0

above which one i need to define in pom.xml file

Use the latest compatibility (so 8.5.2 as of right now)

so i need to define below like

com.vaadin vaadin-server 8.5.2

No, use the vaadin-compatibility-server instead. Same for the other compatibility packages, too.

kk

Hi Olli Tietäväinen,

I have tried with your suggestion but i am having issues with Tokenfield where i am getting below error while doing maven build

cannot access com.vaadin.data.Container
class file for com.vaadin.data.Container not found