Re: Adding/Removing objects to/from toMany relationships.
Re: Adding/Removing objects to/from toMany relationships.
- Subject: Re: Adding/Removing objects to/from toMany relationships.
- From: "Daniele Corti" <email@hidden>
- Date: Mon, 7 May 2007 23:04:29 +0200
2007/5/7, David Avendasora <email@hidden>:
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.
well, I think that using a form with allowMultipleSubmit = true; will help.
Personally, I should use three pages, one for each EO:
<WOForm: allowMultipleSubmit=true;>
RoutingPage:
<table>
<tr>
fieldName1 : <textbox>value=routing.filed1</textbox>
<tr>
fieldName2 : <textbox>value=routing.filed2</textbox>
:
:
:
</table>
<WOSubmitButton: action=""><table>
<tr>
<td>
<listbox>
RoutingSteps related To Object
</listbox>
<td>
<submit: action=""><submit: action=""><td>
<listbox>
RoutingSteps not related To any Object
</listbox>
</table>
</WOForm>
then do something similar for RoutingStep and Component
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 (
This email sent to email@hidden
--
Daniele Corti
AIM: S0CR4TE5
Messenger:
email@hidden
_______________________________________________
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