Re: saving changes
Re: saving changes
- Subject: Re: saving changes
- From: Chuck Hill <email@hidden>
- Date: Mon, 29 Aug 2005 09:53:05 -0700
Two explanations come to mind:
1. You are saving the wrong editing context
2. Your bad code has hosed EOF. Does anything here look familiar?
http://www.wodev.spearway.com/cgi-bin/WebObjects/WODev.woa/wa/Main?
wikiPage=EOFCommandments
On Aug 28, 2005, at 6:51 AM, .::welemski::. wrote:
Hi all,
I have webapp that can upload a file and some information into the
database.
I used wodisplaygroup and it isvery succesfull, it is less coding and
very effecient. I am not able to insert a new file and information as
well as delete.
My problem now is that, i can't get the my "edit" functionality to
work. In order for me to extract the right data for me to delete, view
and alter is that I have to invoke the
"myGroup.selectObject(myEntity);"
and then bind the necessary attributes to the fields.
view works
delete works
but... I cant make any alteration to my existing data on my database.
does "ec.saveChanges()" really save changes?
Of course. Have you checked to see that myEntity.editingContext() ==
ec?
I already tried binding my entity to the textfields and then calling
"saveChanges()" method... but it didn't work.
I already tried binding my instance variable to the texfields like
this;
varName=myEntity.name();//assuming that myEntity is already called
along with the displayGroup
public void saveChangesToData()
{
myEntity.setName(varName);
this.session().defaultEditingContext().saveChanges();
Have you checked to see that myEntity.editingContext() == session
().defaultEditingContext().?
Chuck
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden