|
Hy all of you,
As explained before, I work with vaadin in grails (latest one available heere : https://github.com/ondrej-kvasnovsky/grails-vaadin-plugin/downloads) and I have problem for persisting the datas manipulated in the interface. I would like to atttache the project so that the community can test it but the mailing list refuse my zip file. So you can download it there : https://vaadin.com/forum/-/message_boards/view_message/1167902 The project is based on the official tutorial project with datas in the dev environment. Does somebody can tests that he succeed in creating datas IN the database, not only visually in the interface? Thanks for your help, Regards
Florent THOMAS
Perpignan - FRANCE |
|
Vaading Grails plugin just adds to your Vaadin -classes these methods, which you can use to get Spring beans:
getBean(String beanName) getBean(Class beanType) You have to use save -method to persist the objects. So you could for example make PersonService and add there a method savePerson. Then where you have click event for saving, you could do this: PersonService personService = getBean(PersonService) personService.savePerson(person) |
|
Hy,
THHHHAAAAANNNNNKKKK You, I'm getting totally desperate. I'll try what you recommand. Additionnal question, is the PersonService a grooy part or a vaadin one? regards Le 23/02/2012 17:23, smakela a écrit : Vaading Grails plugin just adds to your Vaadin -classes these methods, which you can use to get Spring beans: getBean(String beanName) getBean(Class beanType) You have to use save -method to persist the objects. So you could for example make PersonService and add there a method savePerson. Then where you have click event for saving, you could do this: PersonService personService = getBean(PersonService) personService.savePerson(person) -- View this message in context: http://grails.1312388.n4.nabble.com/Help-Needed-for-Testing-Vaadin-plugin-and-persistance-issue-tp4413858p4414339.html Sent from the Grails - user mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Florent THOMAS
Perpignan - FRANCE |
|
It is a basic Grails -service so put it in the "grails-app/services" -folder.
|
|
Hy Samkela,
First, thanks for your clues already given. Unfortunately, I'm brand new in grails and I didn't find great tutorial for the service layer neither in the official documentation nor in the official tutorial web page of grails. So what I'v done: - Create a PersonService in the correct package. - Try to launch the app Unfortunately, the list() method used in the PersonContainer is no more recognized. Is it correct to say that as I created the service PersonService, all the save,list methods MUST henceforth be implemented in the service layer? Secondly, is it correct to say that grails works by linking all the services to the domain and java classes only by deleting the suffix Service so that : After compilation, all the classes, domain, services in the same package having the same name are merged in a single notion? Thanks for sharing your knowledge and experience, regards - Try to Le 24/02/2012 10:47, smakela a écrit : It is a basic Grails -service so put it in the "grails-app/services" -folder. -- View this message in context: http://grails.1312388.n4.nabble.com/Help-Needed-for-Testing-Vaadin-plugin-and-persistance-issue-tp4413858p4416663.html Sent from the Grails - user mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Florent THOMAS
Perpignan - FRANCE |
|
Well,
The final answer was in this project : http://sebastien-arbogast.com/2011/02/23/grails-vaadin-and-spring-security-core/
Florent THOMAS
Perpignan - FRANCE |
| Powered by Nabble | Edit this page |
