Vaadin 8.8.3 no Label Constructor found???? WHAT!

So i have the following code in Vaadin 8.8.2(Just upgraded from 7.7.15)

import com.vaadin.shared.ui.ContentMode;

StylesCSS s = new StylesCSS(“OK will “+deSelect.myHtml+” all items below the “+itemcaption+” level?”,“span”);

msgLabel = new Label(s.myHtml,ContentMode.HTML);

and I get an error and get an error saying “no such constructor” not possible the constructor is there in the API.

HELP!!!

Check that you have the right package for ContentMode; in Vaadin 7 it’s import com.vaadin.shared.ui.label.ContentMode; and in Vaadin 8 it’s import com.vaadin.shared.ui.ContentMode; (since more components than Label use it).

Olli Tietäväinen:
Check that you have the right package for ContentMode; in Vaadin 7 it’s import com.vaadin.shared.ui.label.ContentMode; and in Vaadin 8 it’s import com.vaadin.shared.ui.ContentMode; (since more components than Label use it).

Thx Olli,

I do have the “import com.vaadin.shared.ui.ContentMode;” in my class??

And which package is Label from?

Olli Tietäväinen:
And which package is Label from

Thx it is fixed . Something to do with the Compatibility pkg. But I now have this problem

import com.vaadin.v7.ui.TextField;
import org.vaadin.textfieldformatter.PhoneFieldFormatter;

“incompatible types: TextField cannot be converted to AbstractTextField” won’t let me extend

new PhoneFieldFormatter(“US”).extend(tf);

Any component from a .v7 package comes from the Compatibility Package. You can’t mix them with non-compatibility classes in all cases.

Olli Tietäväinen:
Any component from a .v7 package comes from the Compatibility Package. You can’t mix them with non-compatibility classes in all cases.

ok so just to make sure what you are saying is that since the TextField is v7, it won’t work with newer V 8 class of the PhoneFormatter class?

If yes then is there a way around this because the exact version of the PhoneFormatter class was used in Vaadin 7.7.15 and it worked fine.

I’m not familiar with this PhoneFormatter, what is it?

Olli Tietäväinen:
I’m not familiar with this PhoneFormatter, what is it?

So it is an addon

https://vaadin.com/directory/component/textfield-formatter

That linked add-on seems to be for Vaadin 8 (and some later versions, depending on release), so it should work with Vaadin 8 TextFields and not TextFields from the Compatibility package, from what I understand.

Olli Tietäväinen:
That linked add-on seems to be for Vaadin 8 (and some later versions, depending on release), so it should work with Vaadin 8 TextFields and not TextFields from the Compatibility package, from what I understand.

I agree thx

Faras