Jonathan Sylvester
Jonathan Sylvester

Reputation: 1329

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

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.)

Upvotes: 1

Views: 185

Answers (2)

ust3000
ust3000

Reputation: 196

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

Upvotes: 2

szolo
szolo

Reputation: 247

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?

Upvotes: 2

Related Questions