Vaadin Visual Designer ad custom component

Hi all,

I’m trying right now Vaadin 7, already made some tests and I noticed the Custom Vaadin Widgets are automatically loaded in the designer palette (cool) but they are rendered as a dark-grey box with the name of the custom component on it, and also in the property window there are only the common ones.

I would like to use Vaadin in one of my project but I have the need to use a lot of Custom Widgets and so I’m wondering how is it possible (if it is possible) to make visible my custom properties inside the designer and also how is it possible to render an initialized cutom widget instead of a dark-grey box.

Looking into the code I noticed all the properties are pre-loaded (com/vaadin/visualdesigner/model/VaadinComponentProperties.java).

any thoughts?

The major problem with rendering custom widgets fully is that the visual designer runs using its own Vaadin version and widgetset, which might not match those in your project. Its widgetset also contains customizations specific to the visual designer, and these customizations are specific to the Vaadin version the visual designer uses. The current visual designer is actually using Vaadin 6 at runtime, and supports code generation and parsing both for Vaadin 6 and for Vaadin 7. We will probably upgrade the visual designer to internally use Vaadin 7, but that change might be almost invisible to users of the visual designer.

Another issue with rendering them is that the custom components used in a project might depend on other things in the project or even in the development environment of the developer and project.

Thus, even if the visual designer would use the project versions of Vaadin and other libraries and perform widgetset recompilation (which is slow), custom widgets could break the whole editor.

As for the other issue (custom properties), it is possible in theory and the code has been structured so that it would not be very hard to add simple properties (with a setter and a getter) for components the designer is able to render and use in the UI, but there are still some problems. The biggest issue is that the model is constructed on save from the actual component instance, and the placeholder component for custom components will not have those properties. Other problems include how to find out what properties to present as well as the limited set of data types supported for code parsing and generation.