Vaadin, App Engine, EJB

Hey there,

I’m pretty new to Vaadin and it’s just great :slight_smile:

Actually i’m creating a simple “Create account” form

I have a form:

final Form form = new Form();
form.setCaption("Contact Information");
form.setDescription("Please specify name of the person and the city where the person lives in.");
form.setFormFieldFactory(new RegisterViewFormFactory());

I did a RegisterViewFormFactory (implements FormFieldFactory) which creates the specific fields for my RegisterView (MVC Pattern)

additionally I have my JPA User class and I would like to set a databinding. But this is just possible with beans/a bean class and Google App Engine does not support Beans (EJB)?

I imported the JPA addressbook example into netbeans and I have no javax.ejb.EJB packages?

What’s the easiest way to create the form fields to my corresponding User class?

Thanks for the help!

Patrick

Welcome to the Vaadin community, Patrick! :slight_smile:

I think there might have been a slight misunderstanding somewhere: The BeainItem, which would bind your User objects to a Form, has nothing to do with EJBs and can be freely used with Google AppEngine. So you should be free to do Form.setItemDatasource(new BeanItem(myUser)).

Or perhaps I misunderstood you?

HTH,
/Jonatan

Hey Jonathan,

It works, thanks!

I made ghetto between the Vaadin Bean (Class) and the Enterprise JAVA Beans (EJB)

but there is a “Item Property Ids” on my form!?
that comes from a method which I have to implement in my beans, but why it appears on the screen?

Patrick

Great that you got it working!

The BeanItem displays all getters/setters in your class, so you should probably use
Form.setItemDataSource(Item,Collection)

HTH,
/Jonatan