updateData();
}
}
);
}
} // End deleteUser().
It starts with one simple check: never allow a user to delete his or her own ID as suicide
booths3 aren??™t my bag. We then perform the same check as when updating a user to ensure we
don??™t delete a user who is assigned as project manager to any projects (most projects can die
on their own just fine without losing their supposed leader without a replacement). Finally,
after a standard ???are you sure you aren??™t doing something really stupid??? confirmation, we call
deleteUser() on the UserDAO object on the server to be sure to do the same message and data
update as always, and the user is officially gone from the system at that point.
getUserByID() The getUserByID() method is extremely simple, so I think simply describing it
will suffice: it iterates over the timekeeper.users array of User objects and finds the one with
CHAPTER 9 n TIMEKEEPER: DWR EVEN MAKES PROJECT MANAGEMENT FUN! 494
3. Suicide booths are something that have been seen in the great show Futurama a number of times.
Simply put: you step in, you put your quarter in the slot, you select your method of demise, and the
booth dispatches you with great enthusiasm.
Pages:
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839