Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Vaadin 7 and the V-Components
atm Im trying to write some custom widgets with Vaadin 7.
Is there any way to extend MyComponentWidget by the vaadin V-Components such as VTextField
or do I have to use the basic gwt components like TextBox, like shown at the tutorials?
I tryed it with VTextField but I had to override the onFocus method, cause else I would have got a nullpionter exception, what is caused by the using of an ApplicationConnection in VTextField.
Also I have a general, version independent, question.
Is there any way too use objects out of other packages, when I write custom widgets?
For example I want to use my own Stringconvereter in my Connector class. But the Connverter is stored at my util package and I dont want to have the same code writen at my client and util package.
Hope you can help me.
You should be able to extend V-classes. Doing an empty extension of VTextField (and the server counterpart) should act just the same way as a normal TextField, and then you can start making changes to it. Notice however that some parts are private, which can turn extending into an no-go. You can always copy the code in these situations and modify that code.
Vaadin 7 has introduced a new way of doing client side widgets. Unfortunately the Vaadin team hasn't had time to convert the existing components to this new way, so all except VButton and VLabel are still using the Vaadin 6 way. This will hopefully change somewhat before Vaadin 7 final version is released.
Thanks for the fast response, you hellped me a lot!