SKIP THE SHIPPING
Use code NOSHIP during checkout to save 40% on eligible eBooks, now through January 5. Shop now.
Register your product to gain access to bonus material or receive a coupon.
This PDF will be accessible from your Account page after purchase and requires PDF reading software, such as Acrobat® Reader®.
The eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.
The XPages Extension Library’s next-generation XPages controls make application development far more efficient, effective, scalable, and rewarding. With IBM® Lotus® Notes®/Domino® 8.5.3 and Upgrade Pack 1, IBM has incorporated powerful new capabilities and support. These components and technologies are now fully ready for even the toughest production challenges.
XPages Extension Library is the first and only complete guide to Domino development with this library; it’s the best manifestation yet of the underlying XPages Extensibility Framework. Complementing the popular Mastering XPages, it gives XPages developers complete information for taking full advantage of the new components from IBM.
Combining reference material and practical use cases, the authors offer step-by- step guidance for installing and configuring the XPages Extension Library and using its state-of-the-art applications infrastructure to quickly create rich web applications with outstanding user experiences. Next, the authors provide detailed step-by-step guidance for leveraging the library’s powerful new support for REST services, mobile and social development, and relational data. The book concludes by showing how to include Java™ code in Domino XPages applications—a great way to make them even more powerful.
Coverage includes
Foreword xv
Preface xix
Acknowledgments xxv
About the Authors xxvii
Contributing Authors xxix
Part I: The Extension Library, Installation, Deployment, and an Application Tour
Chapter 1 The Next Generation of XPages Controls 3
So How Did We Get Here? 4
Then Came Domino R.8.5.2, and the Extensibility Door Opened 4
OpenNTF and the Controls Too Good Not to Release 5
To Extensibility and Beyond 5
What Makes an XPages Control Next Generation? 5
What Is the XPages Extension Library? 6
Making Domino Application Development Easier, Faster, and Better 8
What Are the Most Important Controls and Why? 8
XPages Learning Shortcuts 9
Bells and Whistles: Welcome to the Future 10
Get Social 10
Upwardly Mobile 11
Relational Data 11
RESTful Web Services 12
Doing It Yourself with Java 12
Conclusion 12
Chapter 2 Installation and Deployment of the XPages Extension Library 13
Downloading the ExtLib 13
Installing the ExtLib via the Upgrade Pack 17
Deploying ExtLib to Developers in Designer 18
Uninstalling the Extension Library from Designer 27
Server Deployment 28
Automatic Server Deployment in Domino 8.5.3 28
Automatic Server Deployment in Domino 8.5.2 34
Manually Deploying Libraries to a Server 38
Deploying the Extension Library to End Users 40
Widget Catalog Setup 41
Creating a Widget Configuration 42
Provisioning the Extension Library Widget to Other Users 50
Conclusion 52
Chapter 3 TeamRoom Template Tour 53
Where to Get the TeamRoom Template and How to Get Started 54
The TeamRoom Template and Why It Was a Good Candidate for Modernization 55
TeamRoom Redesign Brief and Features 56
Application Layout 56
Recent Activities: The Home Page 59
All Documents 60
The Document Form 61
Calendar 63
Members 64
Mobile 66
Lessons Learned and Best Practices 67
Conclusion 68
Part II : The Basics: The Application’s Infrastructure
Chapter 4 Forms, Dynamic Content, and More! 71
Form Layout Components 71
Form Table (xe:formTable, xe:formRow, xe:formColumn) 71
Forum Post (xe:forumPost) 78
Dynamic Content 80
In Place Form Control (xe:inPlaceForm) 80
Dynamic Content (xe:dynamicContent) 83
Switch (xe:switchFacet) 88
Miscellaneous Controls 89
Multi-Image (xe:multiImage) 89
List Container (xe:list) 91
Keep Session Alive (xe:keepSessionAlive) 92
Conclusion 93
Chapter 5 Dojo Made Easy 95
What Is Dojo? 95
Default Dojo Libraries Using Dojo Modules in XPages 96
Simple Dojo Example: dijit.form.ValidationTextBox 99
Dojo Example for Slider 100
Dojo Themes 102
Dojo Modules and Dojo in the Extension Library 103
Benefits and Differences of Dojo Extension Library Components 104
Dojo Extensions to the Edit Box Control 104
Dojo Text Box (xe:djTextBox) 104
Dojo Validation Text Box (xe:djValidationTextBox) 106
Dojo Number Text Box, Dojo Currency Text Box (xe:djNumberTextBox and xe:djCurrencyTextBox) 113
Dojo Number Spinner (xe:djNumberSpinner) 115
Dojo Date Text Box and Dojo Time Text Box (xe:djDateTextBox and xe:djTimeTextBox) 116
Dojo Extensions to the Multiline Edit Box Control 119
Dojo Extensions to the Select Control 120
Dojo Combo Box and Dojo Filtering Select (xe:djComboBox and xe:djFilteringSelect) 120
Dojo Check Box and Dojo Radio Button 126
Dojo Extensions to Buttons 126
Dojo Toggle Button Control 128
Composite Dojo Extensions 130
Sliders 131
Dojo Link Select (xe:djLinkSelect) 135
Dojo Image Select 137
Dojo Effects Simple Actions 140
Dojo Fade and Wipe Effects 140
Dojo Slide To Effect 142
Dojo Animation 143
Conclusion 147
Chapter 6 Pop-Ups: Tooltips, Dialogs, and Pickers 149
Tooltip (xe:tooltip) 149
Dialogs 153
Dialog (xe:dialog) 153
Tooltip Dialog (xe:tooltipDialog) 160
Value Picker (xe:valuePicker) 162
Dojo Name Text Box and Dojo List Text Box (xe:djextNameTextBox and xe:djextListTextBox) 164
Name Picker (xe:namePicker) 165
Validating a Picker 167
Conclusion 170
Chapter 7 Views 171
Dynamic View Panel (xe:dynamicViewPanel) 171
Data Grid 175
REST Service 176
Dojo Data Grid Control (xe:djxDataGrid) 179
Dojo Data Grid Contents 182
InViewEditing 184
View Events 186
iNotes ListView (xe:listView) 187
Dynamic ListView 188
ListView Column 192
iNotes Calendar (xe:calendarView) 194
Calendar Views in the Notes Client 194
REST Service: calendarJsonLegacyService 196
REST Service: Notes Calendar Store 197
Notes Calendar Control 200
View Events 203
Data View (xe:dataView) 206
Pagers 207
PagerSaveState (xe:pagerSaveState) /View State Beans 212
Columns 214
Multiple Columns 219
Forum View 220
Conclusion 221
Chapter 8 Outlines and Navigation 223
The Dojo Layout Controls 223
The Content Pane 223
The Border Container and Border Pane 225
Accordion Container and Accordion Pane 229
The Tab Container and the Tab Pane 231
The Stack Container and the Stack Pane 238
Understanding the Tree Node Concept 239
Standard Node Types 239
The Advanced Node Types 242
Using the Navigator Controls 247
The Navigator Control 247
The Bread Crumbs Control (xe:breadCrumbs) 249
The List of Links Control (xe:linkList) 250
The Sort Links Control (xe:sortLinks) 251
The Link Container Controls 251
The Pop-up Menu Control (xe:popupMenu) 252
The Toolbar Control (xe:toolbar) 254
The Outline Control (xe:outline) 255
The Accordion Control (xe:accordion) 256
The Tag Cloud Control (xe:tagCloud) 257
The Widget Container Control (xe:widgetContainer) 260
Conclusion 261
Chapter 9 The Application’s Layout 263
History of OneUI 263
Easy OneUI Development with the Application Layout Control 264
Legal 267
Navigation Path 268
The Footer 269
The Placebar 270
Search Bar 271
The Banner 272
The Title Bar 273
Product Logo 273
Mast Header and Footer 273
The Layout Control Tooling in Designer 274
Using the Application Layout Within a Custom Control 276
Conclusion 280
Part III: Bell and Whistles: Mobile, REST, RDBMS, and Social Chapter 10 XPages Goes Mobile 283
In the Beginning 283
The XPages Mobile Controls the Extension Library 284
The Basics of the XPages Mobile Controls 284
The Single Page Application Control<xe:singlePageApp> 286
The Mobile Page Control<xe:appPage> 288
The Page Heading Control<xe:djxmHeading> 288
Rounded List (xe:djxmRoundRectList) 289
Static Line Item (xe:djxmLineItem) 291
Mobile Switch (xe:djxmSwitch) 292
Tab Bar (xe:tabBar) 295
Tab Bar Button (xe:tabBarButton) 298
The XPages Mobile Theme 298
Hello Mobile World Tutorial 300
1. Enable the App for the Extension Library and Mobile 300
2. Create a New XPage and Mobile Application 301
3. Add a View Document Collection to the Mobile Page 302
4. Display More Rows 304
5. Opening a Document from the Data View 306
6. Editing and Saving Document Changes 311
Deep Dive into the Controls in the Extension Library, with Examples of Their Use 315
Outline Control 315
Hash Tags 318
Form Table Control (xe:formTable) 318
Dynamic Content Control 320
Data View Control 321
More Link 322
Filter Data 323
Multiple Controls 324
Move to Mobile Page Action 325
Heading (xe:djxmheading) 325
Large Content 326
Using Dojo to Modify Controls 327
XPages Mobile Phone Application Gotchas 327
The Differences Between Web App and Mobile App Layout 327
What Stays the Same? 330
What Has Changed? 330
Conclusion 333
Chapter 11 REST Services 335
REST Services in the XPages Extension Library 336
XPages REST Service Control (xe:restService) 338
Standard Attributes for REST Service Control 338
Standard Attributes for Each Service Type 340
Hello REST World 1: Using the pathInfo Property 340
Example of an XPage that Uses the REST Service Control 340
Hello REST World 2: Computed Column to Join Data 341
Example of a REST Service Control with a Computed Column 341
Hello REST World 3: REST Service in a Data Grid 342
Example of Binding a Grid to a REST Service Control 342
Domino REST Service from XPages Samples 343
Data Service 344
Data Services—Contacts and All Types 345
Dojo Grid Using JSON Rest Data Services 345
Dojo NotesPeek 347
Consuming Service Data with Other Controls 348
iNotes List View 348
iNotes Calendar 349
Calling a Remote Service from Domino 351
JSON-RPC Service 351
Consuming Service Data from External Applications 353
OpenSocial Gadgets 353
Accessing Data Services from Domino as a Built-In Service 356
Enabling the Service on the Domino Server 357
Domino Data Services 360
Database JSON Collection Service 360
View JSON Collection Service 361
View JSON Service 362
View Design JSON Service 366
Document Collection JSON Service 367
Document JSON Service 368
Developing Custom REST Services 375
Conclusion 375
Chapter 12 XPages Gets Relational 377
Accessing Relational Data Through JDBC 377
Installing a JDBC Driver 379
Creating a Connection to the RDBMS 406
Using Relational Datasources on an XPage 410
Working with the xe:jdbcQuery Datasource 413
Working with the xe:jdbcRowSet Datasource 414
Properties Common to Both the xe:jdbcQuery and xe:jdbcRowSet Datasources 415
JDBC Datasources and Concurrency 415
Server-Side JavaScript JDBC API for XPages and Debugging 417
Java JDBC API for XPages 425
Conclusion 428
Chapter 13 Get Social 429
Going Social 429
Get Started 430
Setup 431
OAuth 431
OAuth Dance 431
OAuth Token Store Template 434
Configure Applications to Use OAuth 439
REST API Calls and Endpoints 439
Endpoint Configuration 440
Access Endpoints 446
REST API Calls 447
Utilities for Parsing 449
REST Datasources 450
The Connections Datasource (xe:connectionsData) 452
File Service Data (xe:fileServiceData) Datasource 452
Activity Stream Data (xe:activityStreamData) 454
Proxies 455
Domino Proxy 455
ExtLib Proxies 457
User Profiles and Identities 457
User and People Beans 458
Extensions to User and People Beans 459
Enablement of Extensions 462
Caching of User Information 464
User Identities 465
User Interface Controls 467
Files Controls for Dropbox, LotusLive, and Connections 467
Sametime Controls 471
Connections Controls 474
Facebook Controls 478
IBM Social Business Toolkit 482
Conclusion 485
Part IV: Getting Under the Covers with Java
Chapter 14 Java Development in XPages 489
Benefits of Java Development 489
Referencing Native Java in Server-Side JavaScript 490
Using Java That Others Have Written 491
Setting Up Domino Designer to Create Java Classes 499
Introduction to Java Beans 506
Managed Beans 508
The User and People Bean 509
Conclusion 512
Appendix A Resources 513
Other Resources 514
Index 515