Wiki source code of D2W Rules Reference - Cookbook - FAQ
Version 91.1 by Greg.Brown on 2009/09/18 18:36
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | === Rule Lists === | ||
2 | |||
3 | Below are some commonly used rules and information on keys which control D2W templates. You may wish to keep your own library of commonly used D2W rules, something like "D2WRuleLibrary.d2wmodel", which can then be used to copy and paste rules into your projects. | ||
4 | |||
5 | ==== For quick reference: ==== | ||
6 | |||
7 | ~1. How do I make my attributes and entities editable? | ||
8 | |||
9 | {{noformat}} | ||
10 | |||
11 | |||
12 | 100: true => isEntityEditable = true [com.webobjects.directtoweb.BooleanAssignment] | ||
13 | |||
14 | |||
15 | {{/noformat}} | ||
16 | |||
17 | |||
18 | |||
19 | 2. How do I make my relationships editable in ERD2W? (They all ready are editable in D2W.) | ||
20 | Add two rules. This: | ||
21 | |||
22 | {{noformat}} | ||
23 | |||
24 | |||
25 | 90: task = 'edit' and smartRelationship.isToMany = 1 => componentName = ERD2WEditToManyFault | ||
26 | [com.webobjects.directtoweb.Assignment] | ||
27 | |||
28 | |||
29 | {{/noformat}} | ||
30 | |||
31 | and the below: | ||
32 | |||
33 | {{noformat}} | ||
34 | |||
35 | |||
36 | 90: task = 'edit' and smartRelationship != null and not (smartRelationship.isToMany = 1) => componentName = "ERD2WEditToOneRelationship" | ||
37 | [com.webobjects.directtoweb.Assignment] | ||
38 | |||
39 | |||
40 | {{/noformat}} |