WODisplayGroup and insert
WODisplayGroup and insert
- Subject: WODisplayGroup and insert
- From: "Antonio Moro" <email@hidden>
- Date: Mon, 6 Jan 2003 11:07:05 +0100
I've build two component, the first for listing products and the second to
insert/edit a product.
The list is a WODisplayGroup and when I insert a new product and save it, the
WODisplayGroup dosen't update.
Then if I recall the list from the Main component I can see the new product.
My code for the new product action in list component is:
public DetailProductPage newRecord() {
DetailProductPage nextPage =
(DetailProductPage)pageWithName("DetailProductPage");
// Initialize your component here
EOEditingContext ec = this.session().defaultEditingContext();
product = new Product();
ec.insertObject( product );
nextPage.setProduct( product );
nextPage.setBackComponent( this );
return nextPage;
}
the code in detail component for save changes is:
public WOComponent saveRecord() {
EOEditingContext ec = this.session().defaultEditingContext();
ec.saveChanges();
return backComponent();
}
What I'm wronging?
Thanks.
Antonio Moro
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.