Heylo,
I am trying to create a form that will add the values to my database. The table's primary key, aid, is an auto increment column. Whenever I fill all of the values in the form and hit submit to add the data to the database, I get the following error:
Application: OnTrack Error: java.lang.IllegalArgumentException: attempt to insert a null object into this context Reason: attempt to insert a null object into this context
I have checked to make sure that I am not leaving out any fields that are not null. As a matter of fact, the only field I am leaving out is the aid field. Here is my data for the submit button:
public WOComponent addAnnouncement() { EOEditingContext ec = session().defaultEditingContext(); ec.insertObject(newAnnouncement); ec.saveChanges(); newAnnouncement = new Announcement(); return null; }
I am confused and tired. Any help is greatly appreciated.
Peace,
Vickie |