Hi D2W devs,
I am trying to use ERModernD2W to display and modify a non-model array.
Here's the idea:
You have Foo and Bar.... just kidding. Gotcha Mike.
You have a Message and it is related via a Many-to-Many join table to Person. Each instance MessagePerson also has a Role such as To, From, CC, BCC. So if you are sending a message to 2 people, and cc'ing 1 person, you'll end up with 4 MessagePerson objects (1 from, 2 to, 1 cc). I have written cover methods such as: toRecipients, from, ccRecipients, bccRecipients that automatically filter the messagePersons relationship to return only the appropriate ones. Each of those returns an NSArray<MessagePerson> just like messagePerson does, with the exception of "from" which simply returns a single MessagePerson.
When creating or editing a message, I want to be able to use the setToRecipients, setCcRecipients, etc that will automatically set the correct Role so the user doesn't have to do that. Has anyone done this type of thing before, or know how to accomplish it with ERModernD2W? Ideally I want to use ERMDReducedListPageRepetition to do this as I should be able to make the UI very email-like with just CSS changes.
If I can't make D2W do it, I'll just have to drop back to the boring old hand-coded components to do it.
Dave |