Vaadin designer produces "Element" class in java code for Vertical Layout components

173 views Asked by At

In Vaadin 14.6.1 Designer, when I create Vertical Layouts (and SplitLayouts) and then ask Vaadin designer to create an object in the java code that I can use to reference that component, instead of creating a "VerticalLayout" object, it simply creates an "Element" class. This "Element" class lacks all the critical methods of the normal "VerticalLayout" or "SplitLayout" class. I tried casting, but that failed. Is there a "right" way to get access to the underlying "correct" java object once I've created my layouts via Designer? I need to be able to a) set properties in code and b) even possibly create methods based on various events (eg the splitter position has changed etc.)

2

There are 2 answers

1
ust3000 On BEST ANSWER

If you have implemented Vertical Layouts (or SplitLayouts), Vaadin designer by default connects Element because it does not know which one to connect. Try to right-click the connection button and it will list all implemented component

0
szolo On

Would you be so kind to create an issue in our Designer repository https://github.com/vaadin/designer? Please also attach your project (without dependencies) to it.

I'm not able to reproduce this issue, probably there is something in your project structure.

By the way, are you using Eclipse or IntelliJ IDEA?