Re: [appfuse-user] Spring MVC or General - Begginer Question

2009-11-05 Thread gerogut
This is what I have annotated in BookFile set. @OneToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE}) @JoinTable(name = "book_file", joinColumns = {...@joincolumn(name="book_id")}, inverseJoinColumns = {...@joincolumn(name = "bookFile_id")}) @LazyCollection(value

Re: [appfuse-user] Spring MVC or General - Begginer Question

2009-11-05 Thread ramzi khlil
Can you describe the workflow. How do you add BookFile to Book object ? Ramzi On Thu, Nov 5, 2009 at 2:57 PM, gerogut wrote: > > This is what I have annotated in BookFile set. > > @OneToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE}) > @JoinTable(name = "book_file", joinColumns = {..

[appfuse-user] java.lang.NoSuchMethodError

2009-11-05 Thread watcher
I've getting an error thats got me stumped. I'm running a junit test through eclipse that passes but when I run it via the command line I'm getting the following error. java.lang.NoSuchMethodError: au.com.bytecode.opencsv.bean.CsvToBean.parse(Lau/com/bytecode/opencsv/bean/MappingStrategy;Lau/com

Re: [appfuse-user] java.lang.NoSuchMethodError

2009-11-05 Thread Matt Raible
Run mvn dependency:tree and look at the output (or grep for opencsv). There's a good chance you have two different versions of the same JAR in your classpath. Once you find the offender, exclude it from its dependency. Matt On Nov 5, 2009, at 1:09 PM, watcher wrote: I've getting an erro

Re: [appfuse-user] Spring MVC or General - Begginer Question

2009-11-05 Thread gerogut
Can you describe the workflow. How do you add BookFile to Book object ? Workflow: 1. Books are loaded, the controller is BookController and BookManager gets all books. (books.jsp) 2. I select a book and BookForm is loaded (with book info), controller is BookFormController, command class is Book

Re: [appfuse-user] Spring MVC or General - Begginer Question

2009-11-05 Thread ramzi khlil
You can simply add your book object to the ModelAndView. Use a Map to include the book. Map objects = new HashMap(); objects.put("ParentBook", book); objects.put("bookFileList",bookManager.get(book.getId()).getBookFiles()); ModelAndView().addObject("bookFileList", objects); On Thu, Nov 5, 2009

Re: [appfuse-user] Spring MVC or General - Begginer Question

2009-11-05 Thread ramzi khlil
Sorry I misunderstand you requirement, A simple solution consists of creating a hidden field in BookFileList.jsp that holds the id of the book. Ramzi On Thu, Nov 5, 2009 at 4:13 PM, ramzi khlil wrote: > You can simply add your book object to the ModelAndView. > Use a Map to include the book. >

Re: [appfuse-user] java.lang.NoSuchMethodError

2009-11-05 Thread watcher
I found the bugger. The mvn dependency:tree didnt point to an earlier version of the same jar. So I figured it had to be included in one of the jar that are compiled for scope test. Finally, going through my repository I found the culprit. org.liquibase

[appfuse-user] Hibernate collections

2009-11-05 Thread Oscar Rodriguez
Hi, sorry if this list is not the correct place to ask this, but when I want to update a collection (insert or remove an item) hibernate first remove all items from database and then insert the items in the collection, I don't understand why. Someone knows something about this? Thanks a lot!

Re: [appfuse-user] Hibernate collections

2009-11-05 Thread Dale Newfield
On Thu, Nov 5, 2009 at 4:29 PM, Oscar Rodriguez wrote: > Hi, sorry if this list is not the correct place to ask this, but when I want > to update a collection (insert or remove an item) hibernate first remove all > items from database and then insert the items in the collection, I don't > understa

Re: [appfuse-user] Hibernate collections

2009-11-05 Thread Oscar Rodriguez
I just doing this: ParentObj parent = dao.get(ParentObj.class, id); ChildObj child = new ChildObj(); child.setId(childId); parent.getChildCollection().remove(child); dao.save(parent); Thanks! - Original Message - From: "Dale Newfield" To: Sent: Thursday, November 05, 2009 6:38 PM

Re: [appfuse-user] Hibernate collections

2009-11-05 Thread ramzi khlil
You are creating an new object. Try to get a reference to the object from the list using its object and then run remove(yourobject). Ramzi On Thu, Nov 5, 2009 at 4:46 PM, Oscar Rodriguez wrote: > I just doing this: > > ParentObj parent = dao.get(ParentObj.class, id); > > ChildObj child = new Chi

Re: [appfuse-user] integrating enterprise mule & appfuse 2.02

2009-11-05 Thread jackalista
Hi, I got a bit further with this, and thought I'd share what I'm doing in case anyone else is wanting to use mule and app fuse together. Appfuse provides a fairly high production value web env and mule is the integration platform from hell so together they make a formidable pair. I thought I h

Re: [appfuse-user] integrating enterprise mule & appfuse 2.02

2009-11-05 Thread jackalista
One detail I forgot to mention; make sure to set the parent reference when you add child instances to the set held by the parent model class. As long as you do that you should be able to fling around object graphs and / or their representative XML via mule and web services. -=j=- jackalista

Re: [appfuse-user] Spring MVC or General - Begginer Question

2009-11-05 Thread Wojciech Wąsowicz
2009/11/5 gerogut : > > > 4. When I click on a file, bookFileForm is displayed, the controller is > BookFileFormController and it has a different manager wich is > BookFileManager.(bookfileform.jsp) Here it's the problem, I can't get to > associate the file to the book because I don't know how to g