AddressBook tutorial ported to Vaadin 7

Hei everybody,

I ported the
AddressBook tutorial
to current beta 3 version of Vaadin 7. Find the source-only archive attached to this post. All other dependencies like Vaadin 7 jars, IDE project environment and theme files are excluded. Strip the Vaadin 6 based
bundle
as needed.

Some implementation notes

  • This implementation uses non-deprecated API only. For example, instead of refactoring half way from legacy Application class to LegacyApplication, the new UI class is used.
  • The old Form class utilized the FormLayout, which is not deprecated. So make use of it with FieldGroup.
  • BeanFieldGroup could easily inspect the bean class for properties w/o using an instance of a bean. See comments of mini tutorial
    Auto generating a form…
  • The PersonFieldGroup uses the column captions to modify the fields - this really should be the propertyId. I am missing something here.
  • The postal code validator moved from a regular expression based one, to an internal Integer-base one. That’s because of a isValidType()-check mismatch that prevent the validator to kick in.

Have fun!
12566.zip (13 KB)
12567.png

Very good, thanks for your work.

Hi,

can You please migrate the Source Code to beta11 ?

Thx,
Denis

Chistian, maybe you could put the source codes on github so anyone can do the changes (e.g. as someone requested updated to beta11…)

Hi Denis, here you go. Find the source attached. It just needed some explicite Layouts and setContent()-calls.

Have fun,
Christian
12701.zip (12.9 KB)

Hi Ondrej, you also can attach updated versions here - as I suspect, that the official address book example will be re-released here at Vaadins, when 7.0 is done. So, no need to have multiple “roots”, read repositories floating around.

Cheers,
Christian

Thanks a lot !!!

Hey there,

I’m just starting out with Vaadin so am trying the addressbook. However the layouts seem to have their spacing really messed up (see attached screenshot). I’m using the source that was linked and everything technically seems to be there. However the Navigation bar instead of being a horizontal list of icons appears vertically, with the Button size not being the dimensions of the image, but 100% of the available width. Equally the list of the header, detail page, whilst technically there seems to take up < 10 pixels. I have tried manipulating the setSplitPosition(…) in the ListView class which can make it appear enough that I can see maybe 1/4 of the row.

I am using version 7.0.0.rc2 of the server and client etc.

I don’t know if the problem is that the code needs to be updated to work with new methods, although it all seems to at least make sense, even if it doesn’t work quite right. Or if there’s an issue with spacing with non production ready code. My guy assumption is that I’ve made a noob mistake. However I am running out of ideas now…

Any assistance would be gratefully appreciated.

Sincerely, Ben
12766.png

Hi Ben,

I didn’t have a chance to update to RC2, yet. But your findings smell like “now bad 6.0 style” code. When I started porting the AddressBook tutorial, I didn’t look too deep into the GUI setup.

What does the
?debug
console tell you? Are there layout problems noted?

Cheers,
Christian

Heya Christian, oh yes there are one or two layout problems… (see attached file)

Also when I remote the theme annotation, I have a working UI at least.

Many thanks, Ben
12767.txt (15.6 KB)

Hello Christian

Thank you so much for this job! I was searching so long for an updated 7 version. very helpfull for me!

Isa

You’re welcome, Isa.

Great job. The Book of Vaadin could learn a lot from you. =)

Thanks, Ed!

Necro-thread. (=

Btw.
https://github.com/vaadin/addressbook
and
http://demo.vaadin.com/addressbook/
are 7.x (x < 3), I think.

Cheers,
Christian