Prev | Current Page 803 | Next

Frank Zammetti

"Practical DWR 2 Projects"

The only sections that are even remotely different
are the markup for the Using Timekeeper dialog box, as shown in Figure 9-6.
Figure 9-6. The Using Timekeeper dialog box
And the only real difference is that these are actually simpler sections!
Timekeeper.js
With the style sheet and markup out of the way, we??™re ready to move into the meat of the
client-side code, which is the JavaScript contained in the Timekeeper.js file, and correspondingly,
the Timekeeper JavaScript class.
CHAPTER 9 n TIMEKEEPER: DWR EVEN MAKES PROJECT MANAGEMENT FUN! 479
Weighing in at a hair over 1,000 lines of code, this clearly isn??™t something that should be
dumped onto the pages of a book in its entirety, so let??™s dissect it piece by piece, breaking
where it makes sense. You??™ll find that there is one rather large and complex method, while the
rest aren??™t nearly as daunting.
The Data Fields
The Timekeeper class contains a number of data fields, which are summarized in Table 9-1.
Table 9-1. The Data Fields in the Timekeeper Class
Field Name Description
dialogs An object that stores handles to the various dialog boxes.
currentUser The ID of the user logged in. This is where the ID passed into the init() method
comes into play.


Pages:
791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815