Adding/Removing objects to/from toMany relationships.
Adding/Removing objects to/from toMany relationships.
- Subject: Adding/Removing objects to/from toMany relationships.
- From: David Avendasora <email@hidden>
- Date: Mon, 7 May 2007 15:35:15 -0500
The issue I'm having relates to the Golden Rule of Request Response
loops:
"Don't modify anything that the component or dynamic elements depend
on while in the sequence appToResponse, takeValuesFromRequest and
invokeAction."
Okay, this is a well documented problem, but only from the
perspective of what you must not do, but I can't find any
documentation on how to do things the Right Way and I can't seem to
figure it out for myself.
Here's my class structure: Routing<-->>RoutingStep<-->>Component
What I want to be able to do is allow the user to add/remove
RoutingSteps and Components, move a Component from one RoutingStep to
another, as well as change the values of the attributes of all three
entities all using one page that returns to itself upon the form
being submitted. Yes, it's a lot to do one one page, but by using CSS
and JS, I've been able to make it quite straight-forward from the
user's perspecive.
How do I properly make this type of update without confusing WO and
getting "schizophrenic" results?
I've read
The Wiki: http://en.wikibooks.org/wiki/Programming:WebObjects/
Web_Applications/Development/
General_Best_Practices#Avoid_Changing_WOComponent_Structure_Before_It_Is
_Used
Jerry Walker's sermons on it: http://lists.apple.com/archives/
webobjects-dev/2005/Jul/msg00509.html
Chapters 6 and 7 of Practical WebObjects
I'm assuming that because I'm returning to the same page, I need to
do my work in appendToResponse, but I just don't get how to do that.
Can anyone shed some light on this for me?
Thanks,
Dave
_______________________________________________
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