How to use Dynamic D2W

Version 23.1 by Ravi Mendis on 2009/07/30 06:59

How to use Dynamic D2W

In the Diva look example, we may add a movie to a Studio by clicking "add" on the Studio edit page:

DynamicD2W.png

As you can see from the screenshot (above) that adding a movie allows you to edit/insert a movie inline.
This is achieved using a combination of ajax and dynamic D2W assignments.

In this example we add a single rule to achieve this:

     LHS                                                                            assignment                    key                     RHS                                                                                                 
 (pageConfiguration = 'ListEmbeddedMovie' and parentPageConfiguration like 'Edit')  ERDDelayedBooleanAssignment componentName "conditionKey" = "object.isNewObject";
 "falseValue" = "ERD2WDisplayString";
 "trueValue" = "ERD2WEditString";

Note that the ERDDelayedBooleanAssignment is a somewhat complex rule in that it's RHS value is a dictionary (in plist format).
What it says here is if the Movie object is new use an edit string component, otherwise just display the string.

So the component is dynamically assigned - determined by the condition of the object listed. (i.e if it's new or not).