Inline Task into Task component extravaganza
Inline Task into Task component extravaganza
- Subject: Inline Task into Task component extravaganza
- From: Riccardo De Menna <email@hidden>
- Date: Wed, 20 Jan 2010 12:40:14 +0100
Hi all,
A D2W related question...
I want a component that allows me to edit a record and also edit another one through a relationship. An InlineEditRelationship thing. I want it because I often have correlation tables in to-many relationships that only hold a few fields and it's too confusing for the user to force them to jump and edit another record all together. To the average user, fields of a correlation table are often viewed as data of one or the other side of the relationship.
Let's say we have a Movie << Correlation >> Actor scenario. And we need to keep track of what was the name of the character the actor played in a movie (or his salary or anything related only to that movie). I want to build an EditMovie page that allows me to select the actors that participated to the movie via a very simple and straightforward popup menu and every time I add a new actor I get also a single field for the character name to appear directly inline in the ui. No faults... I'm assuming the actor list is a short one.
Now my question... how should I do this? I thought about two examples.
Example one:
I build a D2W component that edits a relationship by basically sticking a InspectRepetition in it (obviously in a compact short form). When I try to do this I constantly fight against the fact that the D2WContext is setup to edit another entity. So I thought I could build a "subcontext" by cloning the current one and setting it to edit the other entity and pass this via the d2wcontext binding of the repetition component. Would it work or am I going to face a million problems? Forms into forms being the first I can think of.
Example two:
I generate a totally different EditPage via the D2WFactory methods and stick it in my parent component via WOSwitchComponents. This also basically does what I'm doing in example one since the newly created page will have it's own D2WContext.
Or is there a simpler way? I tried just sticking embedded components without touching the d2wContext by simply binding everything I could think of (d2wContext, datasource, object, keys for the relationships... everything) but I constantly run into something that get's pulled out of the d2wcontext instead of the bindings and messes everything up.
I'm in a "wonder enabled" scenario so I can use anything there as well. I saw Ravi does something similar in one of his tutorials but it's a single field. I want a full fledged edit-in-edit thing. Will I be fighting windmills by trying?
Any opinion is welcome and btw, happy start of year to everyone,
Riccardo
_______________________________________________
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