Prev | Current Page 549 | Next

Frank Zammetti

"Practical DWR 2 Projects"

doAbout = function() {
// Just a simple alert pop-up.
alert("DWR File Manager v1.0\nAugust 11, 2007\n\nBy Frank W. Zammetti\n\n" +
"As it appeared in the book " +
"\"Practical DWR 2 Projects\"\n" +
"Published by Apress, Inc. (ISBN 1-59059-941-1)");
} // End doAbout().
As you can see, it??™s nothing but an alert() function call. Not the stuff of senior thesis
papers, I??™ll tell you that!
doPrintDirectoryContents() Method
The doPrintDirectoryContents() method implements the one tool found on the Tools menu,
which is effectively a printable version of the current contents of the file grid:
this.doPrintDirectoryContents = function(inSelectedDirectory) {
// Only do something if a directory is selected.
if (inSelectedDirectory == null || inSelectedDirectory == "") {
alert("Please select a directory to print the contents of");
CHAPTER 6 n REMOTELY MANAGING YOUR FILES: DWR FILE MANAGER 313
return;
}
// Get path of clicked directory.
var path = directoryTree.getUserData(inSelectedDirectory, "path");
// Clear grid and put in loading message.
FileSystemFunctions.listFiles(path,
{ callback : function(inResp) {
// Iterate over the collection of FileVO objects returned.
var htm = "" +
""style=\"font-size:8pt;font-weight:bold;\">";
for (var i = 0; i < inResp.


Pages:
537538539540541542543544545546547548 549 550551552553554555556557558559560561