Re: Global ID problem with flattened relationship
Re: Global ID problem with flattened relationship
- Subject: Re: Global ID problem with flattened relationship
- From: Ângelo Andrade Cirino <email@hidden>
- Date: Wed, 21 May 2014 08:52:55 -0300
Hi Markus,
You are right, that's exactly my model. My problem is that I am trying to stick to ERMODEditRelationshipPage to display and edit the ContactMechanism and its sub entities. My approach has been to try to set the ContactMechanism type prior to the display of ERMODEditRelationshipPage, because this way I can choose which attributes will be shown with displayPropertyKeys rules. Also, since ERMODEditRelationshipPage edits the sub entities indirectly, using key paths, ContactMechanism.awakeFromInsertion must have access to the type of sub entity to be created, and the type must be passed by the D2WContext.
Another problem is that if I leave the type of sub entity to be created in edit time, then I will need a way to reload the display properties and labels inside the ERMODEditRelationshipPage component, based on the event of change in the user selection of a pop up. I didn't find a way to accomplish this.
I tried to create a rule to change an attribute in my parent entities, something like
100 : tabKey = 'Email' => object.contactMechanismTypeFlag = "E" [com.webobjects.directtoweb.KeyValueAssignment]
since I am using a tabbed edit page. But this rule dean't work and I don't know if the rules assignment system will be able to set an attribute value in this way. I tried other ways to set rules to pass the information on the kind of sub entity with no success.
If I am able to set the type of the sub entity prior to the display of ERMODEditRelationshipPage I will solve my problem entirely.
Angelo