Let's maintain users

Log on as the bjones user and click on the Users button. The following screen will be displayed:

Let's maintain users

Enter the letter A in all fields and click the Save button. The Invalid Fields message will then be displayed:

Let's maintain users

Enter valid entries (remembering the validation rules!) and click the Save button. The new user record should then be added to the user list:

Let's maintain users

You can now try to delete and update users to test the different functions you have written. There is a lot of activity hidden from view when you are performing such tests. You can open the JavaScript console appropriate for your browser (Safari Web Inspector, Firefox Firebug, Chrome Developer Tools, or the generic Fiddler http://fiddler2.com/get-fiddler) to inspect the requests being sent. Try logging on again as bjones, clicking on the Users button, adding a new user, and then deleting this new user. You will see the following requests being sent to the server:

Let's maintain users

Liberal use of TTT.console() in your functions will also help in debugging properties and application state. Adding the statement TTT.console(userObj); to the first line of the Application.js doAfterLogon(userObj) function will output the following to the console after a successful logon:

Let's maintain users

Take your time to test and experiment with the different functions you have written. We have covered a lot of concepts in this chapter!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.245.233