Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Visual Designer Custom Component not Displaying

Myk Shaforostov
10 years ago Feb 16, 2012 4:17pm

Hi All,

I have been searching the forums for a solution to my issue and after many trial and error attempts it clicked as to why I could not see my CustomComponents after using the Visual Designer.

My issue here is that even with my Soft Eng background (perhaps I am a really crappy one) I was completely stumped by this and was not able to throw together a POC quickly and easily to continue using Vaadin. In fact, I was about 2 tries away from throwing it out the window.

That said, now that I got it to work I am impressed and I love it, but I suspect there are many people that are abandoning the framework on similar experience.

Here's the issue and suggestion for you.

Ensure that the Visual Designer can create a page that will actually display on first attempt.

My issue was that by default the AbsoluteLayout component was set to Width/Height of 100%/100%. Which, made perfect sense to me, so much so I never thought it was the source of my problem. When I added other sub-components, simple things, just to get something to show-up (hello world) I got empty space, every-time. I started searching for ways to include the component differently, adding it to windows... even started chasing down my configs and servlet code. I just could not get the CustomComponent to display!

Finally, after many forum searches I stumbled on the notion of setting a fixed Width/Height to my AbsoluteLayout and finally saw my simple label!

I just wanted something to be generated and show up on my main page.

I am trialing several RIA frameworks, and have a very aggressive timeline, so the ability to throw together a quick design straight-out-of-the box is a huge deal.

Brad Martin
10 years ago Jul 05, 2012 8:11am

I was looking for an answer to this as well. Angela M in another thread solved this for me. Needed to change .addComponent to .setContent .

huzaifah huzaifah
10 years ago Jul 05, 2012 8:55am