Prev | Current Page 828 | Next

Frank Zammetti

"Practical DWR 2 Projects"

Even gets rid of the leftovers, so no mess, and no fuss!
Eh, call me crazy, but institutionalized suicide at the touch of a button just doesn??™t strike me as quite
the best idea (but it??™s funny as can be on the show!).
an ID matching that of the argument passed in, if there is such a User object, and returns it, or
null if not found. That??™s it, very quick and simple. But, it??™s a function needed elsewhere, so it
had to be mentioned, regardless of its simplicity (and obviousness really).
isUserAssignedToProject() Just like getUserByID(), isUserAssignedToProject() is a very simple
method: given a Project object, see whether a given user ID is contained in the list of assigned
users and return true if so, false if not. The list of assigned users, which is the usersAssigned
field of a Project object, is a comma-separated list of user IDs, so the string is first split, the
resultant array is iterated over, and a simple == check is performed. This is another very simple
but necessary method.
Methods Pertaining to Projects
Now we??™ll look at the methods that deal with projects, but even before we do that, let??™s take a
quick look at the Administer Projects dialog box, as shown in Figure 9-11.


Pages:
816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840