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.

Absurdities in docs, examples, tutorials, blogs and repositories

Pere Pasqual
6 years ago Mar 03, 2017 5:37pm
Pere Pasqual
6 years ago Mar 06, 2017 8:19am
Pere Pasqual
6 years ago Mar 06, 2017 9:57am
Pere Pasqual
6 years ago Mar 06, 2017 10:05am
Alejandro Duarte
6 years ago Mar 06, 2017 1:08pm


Thanks for the feedback. You can open a issue at https://github.com/vaadin/framework/issues Those kind of issues with documentation are highly valuable for the Vaadin development team and the community in the end. I know sometimes is hard to find the documentation for some specific feature. It's a huge challenge to maintain documentation in software projects! But yeah, there definitively are things that can be improved a lot. But let me share how I deal with this.

When I'm coding, I usually read the API documentation in the javadocs, directly in the IDE, which is the fastest thing to do (also available at vaadin.com/api). Then, if for some reason that's not good enough for me, I search on google.com. If that doesn't help, I jump to vaadin.com/docs. If still nothing, I search in the forums at vaadin.com/forum. If no luck, I try with the sampler at demo.vaadin.com/sampler. If still nothing, I ask on the forums, and meanwhile, jump to the IDE again and try following the source code. So far, that has resulted in not only an effective strategy, but an enriching one, and I consider it an escential part of the fun when working with Open Source technologies.

Just my two cents. Cheers!

Pere Pasqual
6 years ago Mar 06, 2017 4:48pm
Alejandro Duarte
6 years ago Mar 07, 2017 8:00am
Olli Tietäväinen
6 years ago Mar 07, 2017 8:19am
Pere Pasqual
6 years ago Mar 09, 2017 4:10pm
Tajiri Ujasiri
6 years ago Apr 12, 2017 7:58pm
Alejandro Duarte
6 years ago Apr 13, 2017 7:14am

Tajiri, some resources:


Quite fragmented at the moment, though. I'll write a blog post or record a video showing this in practice at some point :)

Tajiri Ujasiri
6 years ago Apr 13, 2017 9:26pm


Thanks a mil!  Those links have actualy been pages in my JS Component Implementation BIBLE.  :-)  Another informative post is https://vaadin.com/forum#!/thread/8041905. 

So, I have done most of what is outlined in the links above.  My widgetset compiles, but when I launch the web app I get:

"Communication problem...Invalid JSON response from server"

Please see the attached PNG.  We're deploying to WebLogic.

I'm hoping that tutorial can be done in the very near future!  


Pere Pasqual
5 years ago Apr 20, 2017 1:10pm

Thanks a lot for your nice words, Tajiri. Althought I cannot help you with your last question about the "Communication problem" (maybe you could provide a bit more background info about what you are doing), I'm posting another inconsistence I've found in Vaadin (it's not related to your problem but I thought of this thread as a container for miscellaneous findings).

This time it's regarding the difference between "ReadOnly" and "Disabled" fields. Well, the explanations here (https://vaadin.com/wiki/-/wiki/Main/ReadOnly+vs.+Disabled+fields) would be great if it weren't because when you set a CheckBox field as ReadOnly it looks exactly as if it were / was (?) writable in the Valo theme by default, thus forcing you to set it (erronously) as disabled if you don't know how to style it, or providing a bad UI experience if you leave it that way because the user will try to check / uncheck it.

Probably it would look better and provide some difference with the disabled and writeable states if they had styled it with, let's say, its label in black and the box itself as greyed out.

PS: I would have posted this as a comment there if it weren't because

The Vaadin Wiki is temporarily in read only mode due to large recent spam attacks

PS 2: cursives in the quote above are mine.

Pere Pasqual
5 years ago Apr 20, 2017 2:30pm

In fact, that whole wiki entry is totally outdated. The text field itself that they used as an example looks now almost identical both in disabled and readonly mode. They'd better remove it as looks like they are against their own reasoning...

Pere Pasqual
5 years ago Apr 21, 2017 7:36am

Changing the look of the ReadOnly CheckBox was relatively easy with css:

span.v-checkbox.v-readonly > input ~ label:before {
       background-color: #fafafa !important;
        background-image: linear-gradient(to bottom,#fafafa 2%,#efefef 98%) !important;
        border-color: #eaeaea !important;

Unfortunately, the absurdities of the ReadOnly / Disabled behaviour didn't end here: I just discovered that you cannot programatically set a value for a ReadOnly TextField. There is code in AbstractField.java that that explicitly will throw an exception in this case. Well, it's stated in the link the the wiki I posted above, but it seems I'm not the only one who didn't notice it at 1st sight, as others did about 3 years ago:


So this is a good one. I think that, in the end, I shouldn't try to understand what the Vaadin team didn't understand themselves and better stick to what "kind of" works, ie, Disabled.