Home > Store

XPages Portable Command Guide: A Compact Resource to XPages Application Development and the XSP Language

Register your product to gain access to bonus material or receive a coupon.

XPages Portable Command Guide: A Compact Resource to XPages Application Development and the XSP Language

Book

  • Sorry, this book is no longer in print.
Not for Sale

Audio & Video

Video

Description

  • Copyright 2012
  • Dimensions: 6" x 9"
  • Edition: 1st
  • Book
  • ISBN-10: 0-13-294305-0
  • ISBN-13: 978-0-13-294305-5

A Practical Primer for XPages Application Development, Debugging, and Performance

Using XPages, Lotus® Notes® and Domino® developers can quickly create state-of-the-art web, mobile, and Notes client business applications using standard technologies like HTML, JavaScript, CSS, and XML. Now, there’s a perfect portable XPages quick reference for every working developer. Straight from the experts at IBM®, XPages Portable Command Guide offers fast access to working code, tested solutions, expert tips, and example-driven best practices. Drawing on their unsurpassed experience as IBM XPages lead developers and customer consultants, the authors explore many lesser known facets of the XPages runtime, illuminating these capabilities with dozens of examples that solve specific XPages development problems. Using their easy-to-adapt code examples, you can develop XPages solutions with outstanding performance, scalability, flexibility, efficiency, reliability, and value.

Covers lots of commands and parameters related to

  • XPages behavior modification through xsp.properties
  • Notes/Domino configuration files
  • XSP Command Manager and OSGi Console
  • The XSP Client-Side JavaScript Object
  • Server Side JavaScript scripting
  • Server Side JavaScript debugging via global functions, simple programming constructs, and logging
  • Instantly access all XPages commands: Use this book as your quick offline solutions resource
  • Logical how-to topic groupings provide one-stop research
  • Compact size makes it easy to carry with you—wherever you go
  • “Create Your Own Journal” section with blank, lined pages makes it easy to personalize this book for your needs
  • “What Do You Want to Do?” chart inside the front cover helps you quickly find specific tasks

Designed for all Lotus and Domino developers with at least some XPages experience, XPages Portable Command Guide is the ideal companion and follow-up to Mastering XPages from IBM Press, the world’s #1 book on XPages technology.

Downloads

Downloads

Download the additional files from this book.

Sample Content

Online Sample Chapter

XPages Portable Command Guide: Working with the Domino Server Console and the Notes OSGi Console

Sample Pages

Download the sample pages (includes Chapter 3 and Index)

Table of Contents

Chapter 1 Working with XSP Properties 1

Locating and Updating xsp.properties 7

The Timeout Properties 9

xsp.application.timeout 10

xsp.session.timeout 10

xsp.session.transient 12

xsp.application.forcefullrefresh 13

The Theme Properties 13

xsp.theme 13

xsp.theme.web 14

xsp.theme.notes 15

The Resources Properties 18

xsp.resources.aggregate 18

The File Upload Properties 21

xsp.upload.maximumsize 21

xsp.upload.directory 21

The JSF Persistence Properties 22

xsp.persistence.discardjs 23

xsp.persistence.mode 24

xsp.persistence.tree.maxviews 29

xsp.persistence.file.maxviews 30

xsp.persistence.viewstate 30

xsp.persistence.file.gzip 32

xsp.persistence.file.async 32

xsp.persistence.file.threshold 33

xsp.persistence.dir.xspstate 34

xsp.persistence.dir.xspupload 35

xsp.persistence.dir.xsppers 35

The Client Side JavaScript Properties 37

xsp.client.script.dojo.version 37

xsp.client.script.dojo.djConfig 42

The HTML Page-Generation Properties 44

xsp.html.doctype 44

xsp.html.meta.contenttype 45

xsp.html.preferredcontenttypexhtml 46

xsp.html.page.encoding 47

xsp.compress.mode 47

xsp.client.validation 48

xsp.redirect 49

The Error-Management Properties 50

xsp.error.page.default 50

xsp.error.page 52

The User Preferences Properties 55

xsp.user.timezone 55

xsp.user.timezone.roundtrip 56

The AJAX Properties 57

xsp.ajax.renderwholetree 57

The Script Cache Size Properties 60

ibm.jscript.cachesize 60

ibm.xpath.cachesize 60

The Active Content Filtering Properties 61

The Resource Servlet Properties 65

xsp.expires.global 65

The Repeating Control Properties 66

xsp.repeat.allowZeroRowsPerPage 67

The Partial Update Properties 68

xsp.partial.update.timeout 68

The Link Management Properties 69

xsp.default.link.target 69

xsp.save.links 71

The Control Library Properties 73

xsp.library.depends 73

The Composite Data Properties 75

xsp.theme.preventCompositeDataStyles 76

Other Ways of Applying xsp.properties Settings 77

Viewroot Properties 77

Request Properties 78

Applying Properties Using a Theme 80

What Works Where? 81

Conclusion 81

Chapter 2 Working with Notes/Domino Configuration Files 83

INI Variables You Should Know About 83

The Java Heap 86

HTTPJVMMaxHeapSize Variable 88

HTTPJVMMaxHeapSizeSet Variable 89

JavaMaxHeapSize Variable 89

JavaMinHeapSize Variable 90

JavaEnableDebug Variable 90

JavaDebugOptions Variable 90

JavaUserClasses Variable 90

OSGI_HTTP_DYNAMIC_BUNDLES Variable 91

XPagesPreload Variable 92

XPagesPreloadDB Variable 93

When and Why Is Preloading Important? 93

Avoid Unnecessary Network Transactions in Your Application Code 95

Optimizing Client Memory Usage 96

vmarg.Xms 97

vmarg.Xmx 97

Enabling Extended Java Code with the java.policy File 97

JavaUserClasses 100

Conclusion 102

Chapter 3 Working with the Console 103

About the XSP Command Manager 103

How to Execute the XSP Command Manager Commands 103

show data directory 104

show program directory 105

show version 105

show settings 106

show modules 108

refresh 108

heapdump 109

javadump 109

systemdump 111

Working with the OSGi Console 112

diag 114

ss, ss , or

ss 116

start 119

stop 120

b 120

headers 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

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020