121 help 122
How to Launch Notes/Designer Along with the OSGi Console 123
Common Console Commands You Should Know 126
help 127
load [task-name] 127
load [task-name] -? 128
quit 129
restart server 129
tell [task-name] quit 130
restart task [task-name] 130
show server 131
show conf [notes.ini variable] 132
set conf [notes.ini variable=value] 132
tell adminp [options] 132
load chronos [options] 133
load updall [path] [options] 134
load design [source] [target] [options] 134
load fixup [path] [options] 135
show tasks 136
show allports 136
show diskspace 137
show heartbeat 137
Conclusion 138
Chapter 4 Working with the XSP Client Side JavaScript Object 139
What Is the XSP Client Side JavaScript Object? 139
Summary of the XSP Client Side JavaScript Object Functions 145
The Public XSP Client Side JavaScript Object Functions 160
XSP.alert(message) : void 161
XSP.confirm(message) : boolean 162
XSP.error(message) : void 162
XSP.prompt(message, defaultValue) : string 163
XSP.djRequire(moduleName) : object 164
XSP.addPreSubmitListener(formId, listener, clientId, scriptId) : void 165
XSP.addQuerySubmitListener(formId, listener, clientId,
scriptId) : void 166
XSP.canSubmit() : boolean 167
XSP.allowSubmit() : void 168
XSP.setSubmitValue(submitValue) : void 169
XSP.getSubmitValue() : object 170
XSP.validateAll(formId, valmode, execId) : boolean 171
XSP.getFieldValue(node) : string 172
XSP.getDijitFieldValue(dj) : object 173
XSP.validationError(clientId, message) : void 174
XSP.scrollWindow(x, y) : void 176
XSP.partialRefreshGet(refreshId, options) : void 176
XSP.partialRefreshPost(refreshId, options) : void 177
XSP.attachClientFunction(targetClientId, eventType, clientScriptName) : void 179
XSP.attachClientScript(targetClientId, eventType, clientScript) : void 180
XSP.addOnLoad(listener) : void 181
XSP.showSection(sectionId, show) : void 182
XSP.findForm(nodeOrId) : object 183
XSP.findParentByTag(nodeOrId, tag) : object 183
XSP.getElementById(elementId) : object 184
XSP.hasDijit() : boolean 184
XSP.trim(s) : string 185
XSP.startsWith(s, prefix) : boolean 186
XSP.endsWith(s, suffix) : boolean 186
XSP.toJson(o) : string 187
XSP.fromJson(s) : object 187
XSP.log(message) : void 188
XSP.dumpObject(object) : string 189
How XPages Uses the Dojo Framework 189
Dojo Types and Attributes 190
Working with Dojo Dijits 193
IDs in the HTML Source and the Requirement to Use the “#{id:” Syntax 193
Scripts Accessing Dojo Controls Need to Use dijit.byId 195
Dojo Controls Are Not Available While the HTML Page Is Loading 196
Bad AJAX Requests to an XPage Can Cause Loss of Data 197
XPages Input Validation Can Interact with Dojo Layout Controls 198
Dojo Control Interaction with XPages Partial Update 199
Client-Side Debugging Techniques 201
XSP Object Debug Functions 201
Client-Side Debugging with Dojo 202
Other Miscellaneous Client-Side Debugging Information 204
Conclusion 207
Chapter 5 Server-Side Scripting 209
What Can I Do with Server Side JavaScript? 210
XPages Object Model 210
Server-Side Scripting Objects and System Libraries 210
Summary of Server-Side Global Functions 216
getComponent(id:String): UIComponent 219
getClientId(id:String): String 223
getLabelFor(component:UIComponent):UIComponent 224
getView(): UIViewRoot 225
getForm(): UIForm 225
save():void 226
Working with Java Made Simpler 226
Importing Java Packages into Server Side JavaScript 226
Creating Custom Java Classes 227
Creating Managed Beans 227
Conclusion 238
Chapter 6 Server-Side Debugging Techniques 239
The “Poor Man’s” Debugger 239
print(message) : void & println(message) : void 239
_dump(object) : void 241
Using try/catch Blocks 246
How to Set Up a Server for Remote Debugging 247
Debugging Java Code and Managed Beans 250
Debugging XPages Extension Plug-ins 261
How to Configure notes.ini and rcpinstall.properties for Logging 262
Interpreting a Stack Trace: Where to Go from Here? 268
Understanding the XPages Request Handling Mechanism 268
Understanding the XPages Request Processing Lifecycle 269
XPages Toolbox 275
Conclusion 276
Appendix A Definitive Resources 277
Appendix B Useful Online Resources 279
Appendix C Make Your Own Journal 281
Index 285