Wiki source code of Configuring ERDEditPassword and ERDEditPasswordConfirmation
Last modified by David Holt on 2012/02/17 15:01
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | === (% style="color: rgb(0,0,0);" %)**Using the Edit and Confirm Password components with D2W**(%%) === | ||
2 | |||
3 | (% style="color: rgb(51,51,51);" %)These are two useful and easy to configure components to use in your sign up pages with D2W. | ||
4 | |||
5 | [[ERDEditPassword>>url:http://webobjects.mdimension.com/hudson/job/Wonder/javadoc/er/directtoweb/components/strings/ERDEditPassword.html||shape="rect"]] and [[ERDEditPasswordConfirmation>>url:http://webobjects.mdimension.com/hudson/job/Wonder/javadoc/er/directtoweb/components/strings/ERDEditPasswordConfirmation.html||shape="rect"]] | ||
6 | |||
7 | (% style="color: rgb(51,51,51);" %)The final result will be two password edit fields that make the user type their password twice to confirm that they typed what they intended: | ||
8 | |||
9 | [[image:attach:signup with password confirmation.png]] | ||
10 | |||
11 | ==== (% style="color: rgb(0,0,0);" %)**The configuration:**(%%) ==== | ||
12 | |||
13 | (% style="color: rgb(51,51,51);" %)1. Set up a dummy propertyKey for your Password Confirm field since it won't be a real attribute in your database (in this case "confirmPassword"): | ||
14 | |||
15 | {{noformat}} | ||
16 | |||
17 | 100 : pageConfiguration = 'SignUpPerson' => displayPropertyKeys = ("login", "email", "password", "confirmPassword") [com.webobjects.directtoweb.Assignment] | ||
18 | |||
19 | |||
20 | {{/noformat}} | ||
21 | |||
22 | (% style="color: rgb(51,51,51);" %)2. Make sure that you include both components on the page - one for the password propertyKey and the other for the confirmation propertyKey | ||
23 | |||
24 | {{noformat}} | ||
25 | |||
26 | 100 : (pageConfiguration = 'SignUpPerson' and propertyKey = 'password') => componentName = "ERDEditPassword" [com.webobjects.directtoweb.Assignment] | ||
27 | 100 : (pageConfiguration = 'SignUpPerson' and propertyKey = 'confirmPassword') => componentName = "ERDEditPasswordConfirmation" [com.webobjects.directtoweb.Assignment] | ||
28 | |||
29 | |||
30 | {{/noformat}} | ||
31 | |||
32 | (% style="color: rgb(51,51,51);" %)3. Set the property for ERDEditPassword passwordConfirmationValidated to true: | ||
33 | |||
34 | {{noformat}} | ||
35 | |||
36 | |||
37 | 100 : (pageConfiguration = 'SignUpPerson' and propertyKey = 'password') => passwordConfirmationValidates = "true" [com.webobjects.directtoweb.BooleanAssignment] | ||
38 | |||
39 | {{/noformat}} |