Re: [appfuse-user] How to insert a new object from another object (command) form

2007-07-17 Thread Sielm
Michael i can't express how grateful i'm for your kind help! You made it ^L^:clap: Thanks to the unit tests i could finally trace the source for error. In the results of the tests i got a pretty generic error which prevented the WeekActivity from being saved. The exact reason was so basic i almos

Re: [appfuse-user] How to insert a new object from another object (command) form

2007-07-16 Thread Sielm
Yes, the controller extends SimpleFormController. I was using the onBind method because i saw it on another source code file. In fact i'm not using onSubmit on this controller, so it is empty... I already tried the PropertyEditor for Week and User, and everything compiles fine but i get a null po

Re: [appfuse-user] How to insert a new object from another object (command) form

2007-07-16 Thread Sielm
Still with the same problem :/ i still get the same hibernate error from before. In fact, i was already using spring form tags. I have this code in my JSP: -- "> ">

Re: [appfuse-user] How to insert a new object from another object (command) form

2007-07-16 Thread Sielm
Thank you very much for your kind and very quick answer! I will try this right now. You are right on the navegability on that association, and also on the activity_id column in the WeekActivity table. Let's see if i get this to work! Thanks again :) Best regards. Michael Horwitz wrote: > > I

Re: [appfuse-user] How to insert a new object from another object (command) form

2007-07-16 Thread Michael Horwitz
I think the problem is in the association you have attached to the getActivity() method in WeekActivity. I am assuming the association between WeekActivity and Activity is uni-directional and can only be navigated from WeekActivity to Activity? I am also assuming that the table for week activity c

Re: [appfuse-user] How to insert a new object from another object (command) form

2007-07-16 Thread Sielm
By the way, i forgot to mention that the Activity row is actually saved into the database correctly, but i get the error when trying to persist the WeekActivity entity, so the WeekActivity table is always empty... Best regards. Sielm wrote: > > Hi again. Here are the details i've worked on so

Re: [appfuse-user] How to insert a new object from another object (command) form

2007-07-16 Thread Sielm
Hi again. Here are the details i've worked on so far: /** * @hibernate.class table="activity" */ public class Activity extends PersistentObject { private String name; private Float mondayHours; private Float tuesdayHours; private Float wednesdayH

Re: [appfuse-user] How to insert a new object from another object (command) form

2007-07-15 Thread Michael Horwitz
O.K. It should all work as long as you have the relationship between WeekActivity and Activity marked as cascade=save. If you are having trouble with the mapping/annotations just post up a sample of what you have so far, and we can help. Mike. On 7/14/07, Sielm <[EMAIL PROTECTED]> wrote: Sorr

Re: [appfuse-user] How to insert a new object from another object (command) form

2007-07-14 Thread Sielm
Sorry, i forgot about these details. I'm using AppFuse 1.9.4 with Spring for the front end too, and Hibernate for persistence. The actual database is MySQL 5.x (not sure about the exact version). Thanks a lot. If i forget anything else please tell me and i will reply as soon as possible. Best r

Re: [appfuse-user] How to insert a new object from another object (command) form

2007-07-14 Thread Michael Horwitz
Which version of AppFuse are you using and with which web front end? Details as to which persistence layer you have chosen would also be useful: Hibernate, JPA or iBatis? P.S. You English is excellent, by the way! Thanks Mike. On 7/13/07, Sielm <[EMAIL PROTECTED]> wrote: Hi all. I'm new to

[appfuse-user] How to insert a new object from another object (command) form

2007-07-13 Thread Sielm
Hi all. I'm new to J2EE and AppFuse and have been tinkering with it for a while now. The main thing is this: i have a "big" object called WeekActivity which represents an activity made by an user in a week, and i need to be able to make a form to create new rows in the database for this object. Th