Hello everyone,
So far I’m really impressed with Vaadin! The visual appeal of the controls is fabulous; the client side awareness of things like communications difficulties & timeouts is brilliant, and there is a wealth of information available in these forums.
I have been working with Vaadin as a possibe GUI for an application for a little while now, but I’ve come up against a few problems and cannot find a way around on my own.
The Server App:
The server Application is an EJB3 app, running on a Glassfish server. The Vaaadin GUI app connects via a remote SLSB; and that remote session bean is the only interface between the 2 apps.
The required entity beans have been extracted into a client side JAR, which is part of the library for the client app.
NB: All the Annotations are intact in the client side JAR. They are literally the same beans from the server app.
All data changes are managed from the server app; the front end is truly just the GUI. I have a different AJAX front end working, but Vaadin is so compelling that I am very keen to complete a proof of concept and move to full blown implementation!
Data binding has always been an issue in AJAX frameworks ( I had to implement my own with the previous framework I was using. Nasty!) so I really want to see that functionality in action with my system.
As a trial I have been working on a form to display & update Person information. I have successfully implemented the login process from the Vaadin client to the glassfish back-end, and also successfully retrieved a person into a form.
I have also retrieved a few of the lookup table contents into some Combo boxes (via IndexedContainers as per several examples), which as part of the form. In the database, these lookup tables are FK relations for the Person table: Gender, Language, Title, etc.
And the results are visually beautiful!
My problem is that when I commit the changes a whole slew of hibernate errors are being generated! The annotations are being read and attempts are being made to action them. I most definitely do not want this to happen - all the data and persistence are handled back in the appication server.
It’s got me stuck - I’ve seen a few different posts that are broadly similar in nature, but not quite the same concerns.
So my questions are:
-
Do I have to remove the JPA annotations from my entities in order to use them as POJOs in Vaadin? (There are about 50!)
-
Can I programmatically disregard/ignore the annotations & just use my entity beans as ‘pure’ POJOs ?
-
Should I be using specific classes or interfaces that are not annotation/relationship aware?
-
(Not the same topic but I’m on a roll!) If I want the application to reset if anyone refreshes the browser screen - what do I do? Is this a config setting or an application startup process/parameter that I must deal with?
I realise that this is a lot different to the other reuests I’ve read (usually asking you to increase the JPA/Hibernate support!) but it would be so much help I can’t being to explain.
Many thanks,
Chris.