| Following this example is easy: public WOComponent createBlogEntryAction() { EOEditingContext ec = session().defaultEditingContext(); EOEnterpriseObject newEntry = EOUtilities.createAndInsertInstance(ec, "BlogEntry"); newEntry.takeValueForKey(title, "title"); newEntry.takeValueForKey(body, "body"); newTitle = newBody = null; ec.saveChanges(); return null; } However, I don't want to create a dozen single keys in WOBuilder, and I'd rather create a key that references the Entity, so I can easily drag its attributes to the correct fields. So, I created a new key "newEntry" and made it of type "BlogEntry" (which is the entity that includes title and body), instead of a bunch of independent strings. This creation showed a key with references to all the attributes in that entity. However, I'm a bit confused as to how to replace these lines: newEntry.takeValueForKey(title, "title"); newEntry.takeValueForKey(body, "body"); Since it no longer works, as those references now point to: newEntry.title newEntry.body I've tried replacing title for newEntry.title (and the body attribute as well), but it doesn't work. What does? Thanks, jeremy |
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]
