Wiki source code of How to use Dynamic D2W
Version 10.1 by Ravi Mendis on 2009/07/20 10:05
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | = How to use Dynamic D2W = | ||
2 | |||
3 | In the Diva look example, we may add movies to a the list of ##Studio.movies##. | ||
4 | |||
5 | [[image:DynamicD2W.png||width="700"]] | ||
6 | |||
7 | As you can see from the screenshot (above) that adding a movie allows you to edit/insert a movie //inline//. | ||
8 | This is achieved using a combination of //ajax// and //dynamic// D2W assignments. | ||
9 | |||
10 | In this example we add a single rule to achieve **dynamic D2W**: | ||
11 | |||
12 | |= LHS |= assignment |= key |= RHS | ||
13 | | (pageConfiguration = 'ListEmbeddedMovie' and parentPageConfiguration like 'Edit') | **ERDDelayedBooleanAssignment** |**componentName** |"conditionKey" = "object.isNewObject"; | ||
14 | "falseValue" = "ERD2WDisplayString"; | ||
15 | "trueValue" = "ERD2WEditString"; | ||
16 | |||
17 | Note that the **ERDDelayedBooleanAssignment** is a somewhat complex rule in that it's RHS value is a dictionary (in plist format). | ||
18 | What it says here is if the Movie object is new use an edit string component, otherwise just display the string. |