Re: Nested ec's and new objects
Re: Nested ec's and new objects
- Subject: Re: Nested ec's and new objects
- From: email@hidden (Anjo Krank)
- Date: Tue, 10 Dec 2002 21:07:08 +0100
Am Dienstag, 10.12.02, um 20:45 Uhr (Europe/Berlin) schrieb Jonathan
Rochkind:
Another thing you can do: This is kind of a cop-out, but it's what I
actually do: Don't allow the user to do things like this. If the pain
to implement wasn't enough deterrent, in addition I think it ends up
being confusing to the user. Instead, I only let the user add a new
book to a _saved_ Author.
I had a similar problem, and my first cop-out was not to allow
additions to an author with errors. That is, the "Add" button would
validateForSave() the author and not allow to leave the page until the
errors on this page were corrected. Once they were, you could go the
the Books page with a nested EC (without saved author).
But then trouble really starts when you have rules like "books is
mandatory", so you can't leave to books until the author has no errors,
but the author *will* have errors until he has books...the only
solution I found was to embed a list of books with into the author page.
If the Author hasn't been saved yet, you can't add Books for the
Author. You can't add Books until you've actually saved the Author to
the db. I find that users don't really miss the ability to do
otherwise. In your situation, that may be unacceptable, in which case
I'd suggest the doubly-nested-EC design above, but it can be a pain.
You should make your users aware that they have to save *twice* with
this procedure, though. They might think that pressing "Save" on the
books page is enough...
Cheers, Anjo
_______________________________________________
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.