Learning Vaadin a headacke!

I think it is very difficult to develop with Vaadin.
Not because of the concept but because of the samples who are not finished, or deprecated and not updated in the book of Vaadin.
As i am looking to how to use a form i see FormLayout. Finish Form! I am looking to see how to design a form but nothing about validation, no practical solution in the book.
Everywhere it is the same thing. I am not writing a toy but an application!
I am obliged to search on google or others books. But there the POMs are completely inside each others.
So the examples are not running for the first time.
What to said about Add Ons? sometimes evil sometimes devil.

Sorry but i said what i think. I continue Vaadin…

i found this

https://vaadin.com/book/vaadin7/-/page/datamodel.itembinding.html


https://vaadin.com/book/vaadin7/-/page/components.fields.html#components.fields.validation


http://dev.vaadin.com/svn/versions/6.1/src/com/vaadin/demo/featurebrowser/FormExample.java
(deprecated)

http://www.aceevo.com/easy-form-creation-with-builder-patterns-in-vaadin/
(very good work but deprecated)
his code on Github
https://github.com/rjenkins/Fluent-Builder-Vaadin-Forms

As i cannot delete the thread. I confirm the whole.
The example are too much complex. We want to learn how to use form validation with validator without bean but where is that ? To resume and to be more practical where can i find a SIMPLE CONTACT FORM simple example and not fragmented? Add Ons …No!
For the rest i know i should use Spring Email.

  1. Generally I look at the source code of the Vaadin Library to find out how something works ( if I cannot find simple examples ).
  2. What do you have against add ons ? Some of the best examples can be found from the add-on demos BTW. Not fragmented but complete working ( usually with a working online demo ). And you dont have to use the addons to learn something from the examples they provide. It is good to look at source of the demo’s since they can provide different perspective or patterns to handle the same problem.

Perhaps your problem is not so much with Vaadin but more with a lack of experience building event driven applications.
You should approach Vaadin applications more like a Swing application than a webpage.

For Form Validation , look at the sourcecode of BeanFieldGroup , from that you could see how to add and implement your own Validators to your fields, since you dont want to bind a bean to your form via a FieldGroup ( not sure what your reason is for that ) , you will have to add your own Validators to each field.

I have to tell you though that binding a bean to the form via a FieldGroup will simplify your program a lot.

Just my 2c of advice.

Aldo i understand your frustration (as i am myself studying Vaadin 7 at the moment)
The link you gave:

https://vaadin.com/book/vaadin7/-/page/datamodel.itembinding.html]

on top of the page is to read:
Because of pressing release schedules to get this edition to your hands, we were unable to completely update this chapter. Some form handling is still under work, especially form validation.

also on the preface page they mention :
Writing this manual is an ongoing work and it is rarely completely up-to-date with the quick-evolving product.

But i know it blows at times when you want to learn and are being hold back by incomplete or no longer working documentation. I suggest to also check the example’s found in the
sampler

In some cases even the old docs of 6.8 can give some inside.

Also an option would be to order one or more books located here:
book

I myself bought Vaadin 7 cookbook witch is also helping me (al do I also found there some small mistakes)

For me personal the hardest part is that I almost figured out how addins work in Vaadin 6.8 to find the system completely changed in 7.0 and I hope by the time i am in need to write an add-on the complete documentation can be read somewhere.

I myself am also struggling but as it was in the early days of Vaadin 6 I remember all to well the many changes and incomplete documentation back then. In time it will all be ironed out (i hope also the push function)

Hang on in there! your not the only one struggling along smile

Hi Arnold,
i appreciate your comments.
I have all the books and are partly deprecated.
Learning Vaadin 7 Second Edition tell nothing about Form Validation.
yes i downloaded the samples from Github but POMs are everywhere, i didn’t yet succeded to compile them. i should return to that problem!
https://github.com/nfrankel
.
Sampler is fragmented, not practical!
Vaadin Recipes of Casey Tailor is a very good book.
But i don’t speak about him.
I want to said that someone paint code instead of giving practical and whole solution!

@SuppressWarnings(“deprecation”)
Finely i will take the code of Casey Tailor Chapter 14 Forms and Data Binding in deprecated solution.

Is it a Joke?

http://demo.vaadin.com/book-examples-vaadin7/book#component.menubar.basic

When i click on Form i got a white page.

This is a valid point, the book does not describe form validation in enough detail. The basics are said there: FieldGroup runs validation and commits for all the fields in it. I suppose there should be a proper example of that simple case.

The old Form component was deprecated because it was too restrictive about the layout of forms. On the other hand, it was quite simple to use and now it requires a lot more code to do simple forms, which is why some book examples (especially in the online ones) still use the old Form component.

Especially, displaying field errors in the form like they were displayed in the old Form is rather difficult now. So yes, those practices should be well-documented in the book and they are currently not. But it’s a known issue!
Here’s one experiment
to find a way to make a form like the old Form component. It still requires much more code to make a form, but it does the job…mostly.

Sorry for the broken examples, I know there are still some that have not been fixed for the latest Vaadin 7 version.

But you should expect that as it reads there in the demo:

The Form component is deprecated anyhow, so it should be removed from the examples. That’s still ongoing work, largely because converting the examples to use the FieldGroup makes them longer and more complex, and often in irrelevant ways, so that clarity suffers, which I would like to avoid.

  1. You should stop calling other peoples hard work a joke .
  2. I have not seen in any of the many posts you have made, that you stated you environment, browser,os,IDE.
  3. Have you read the
    wiki
    , with its many examples and articles.

Just do us the courtesy of doing some basic fault reporting when do have a problem, like the link above , what browser ? what version of said browser ? what OS ( and version ) , any errors in javascript error console ? you sure you enabled javascript for the site ? etc…

Another suggestion, if you want answers , or just want to learn something from the community , ask the question to the problem you have, instead of calling things a joke ( seems to be your favorite term ).

For example this thread, You obviously have some problem to understand form validation.

A better approach ( than stating Learning Vaadin a headacke! ) , would be to sketch your requirements (in words ) and ask the community (or even
http://stackoverflow.com/
) what they consider to be the best practice for your specific environment.

There is an old saying , There are many ways to skin a cat. and there are many ways to do Form Validation , it all depends on your specific needs. Earlier in the thread you stated you did not want to bind a bean to the form, this already makes your usage deviate from the norm, surely you cannot expect Vaadin to document every fringe case, or every way developers can dream up to use and abuse their Vaadin framework ?

Hi Petrus,
I am not asking how to use web but Vaadin, do not confuse!

Here is the link for a contact form running

https://vaadin.com/forum#!/thread/4088444