Thanks that should do the trick On Wed, Aug 27, 2008 at 9:43 PM, Ramsey Gurley <[EMAIL PROTECTED]> wrote:
> > On Aug 27, 2008, at 2:46 PM, Ted Archibald wrote: > > Let's say I have a simple D2W app (using wonder) with two entities, Person >> and Addresses which are related with a one to many relationship. >> >> In the edit page for the person entity is there a way to add a "Create new >> Address" action to create a new address entity? I've gone through all the >> components and all I can do is choose an address that is already created, >> which doesn't make sense for the workflow. Do I need to create a component >> with this action? If so, how do you do that? >> > > > I'm assuming you're using the default Wonder Neutral look. You should be > able to do this with an EditRelationshipPage. You'll need to create a rule > like: > > (task = 'edit' and smartRelationship.isToMany = 1) => componentName = > "ERD2WEditToManyFault" > > Once you do that, you'll see you know longer get the () beside Addresses > when you're creating a person. Instead, you should see a WOBrowser with a > little edit icon beside it. In my example here, I'm using Manufacturer <->> > Products, but the premise is the same... > > > > > > When you create a person, click the little edit icon by the Address > relationship, and it takes you to a EditRelationship page. You can then > click the "New" button which will allow you to create a new Address. > > > > > > This will not be visible if your address entity is readonly. If you do not > see the button, you may want to add a rule like: > > *true* => isEntityEditable = "true" > > That of course makes all your entites editable all the time, so you > probably won't leave it that way, but it is false globally by default. For > your testing, turn it on. Anyway, moving right along... After you've > clicked "New" and entered your address info, you should be able to "Save" > the address. > > > > > > Even though your person relationship is probably mandatory, don't worry > about creating the Person relationship just yet.... You should now see a > new Address in the WOBrowser. Now click the Return button in the > EditRelationship page which will take you back to your EditPerson page. > > > > > > At this point, the EditPerson page will be complaining about any missing > required info if you have any... like a name, so go ahead and enter your > remaining info, click "Save" and you're done :-) Just don't forget to > select your newly created address before clicking save! > > > > > > Ramsey > > >
_______________________________________________ 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]
