Wiki source code of Using ERD2WWizardCreationPage
Version 2.1 by Paul Hoadley on 2009/05/16 05:42
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | [[##ERD2WWizardCreationPage##>>http://webobjects.mdimension.com/wonder/api/er/directtoweb/pages/ERD2WWizardCreationPage.html]] and the subclass [[##ERNEUWizardCreationPage##>>http://webobjects.mdimension.com/wonder/api/er/neutral/ERNEUWizardCreationPage.html]] are page-level components for editing an entity in a wizard-style user interface. The attributes to edit (including attributes of related entities via relationships), and even page and section titles are all provided by the rules file. | ||
2 | |||
3 | Assume there is an entity ##Employee##, with a to-one relationship ##contactDetails## to an entity ##ContactDetails##. The following rule: | ||
4 | |||
5 | {{code borderStyle="dashed"}} | ||
6 | |||
7 | 100 : (task = 'edit' and entity.name = 'Employee') => | ||
8 | displayPropertyKeys = ("[Page 1]","(Personal Details)",firstName,lastName,"[Page 2]","(Address)", | ||
9 | "contactDetails.address1","contactDetails.address2", | ||
10 | "contactDetails.address3","contactDetails.suburb","contactDetails.state", | ||
11 | "contactDetails.postcode","(Contact)","contactDetails.email", | ||
12 | "contactDetails.phone","contactDetails.fax" | ||
13 | |||
14 | {{/code}} | ||
15 | |||
16 | will create a wizard with the following properties: | ||
17 | |||
18 | * Two pages, entitled "Page 1" and "Page 2" | ||
19 | * Page 1 will have a single section entitled "Personal Details", with fields for ##firstName## and ##lastName## attributes. | ||
20 | * Page 2 will have two sections, "Address" and "Contact", where each of those sections will have fields for the attributes of the ##ContactDetails## entity retrieved via the ##contactDetails## relationship as listed in the rule above. | ||
21 | |||
22 | The changes are saved after hitting the Save button on the final page. |