An introduction to using XPages in Domino 8.5

In this tutorial from contributor Chuck Connell, you'll get a brief introduction to XPages, a new feature in Domino 8.5 and Domino Designer 8.5. Plus, you'll get step-by-step instructions on how to set it up and test your own XPages as well as some real-word design examples.

Domino's XPages feature is the first new application design element released in years. XPages are similar to the older Domino pages -- blank palettes that you fill with text, links, data and various control features. This article gives a short introduction to XPages using simple real-word examples that you can build off of, experiment with and modify.

The key difference between XPages and previous Lotus Notes/Domino design elements is that XPages free application developers from the "one document at a time" design box. Before XPages, Notes/Domino application users could look at a single document (form) or a list of documents one line at a time (view). But it was difficult or impossible to interact with data from more than one document or database. DbLookups and PostSave events were available, but they can be awkward and aren't permitted in some instances.

XPages allow designers to present Lotus Notes/Domino users with the data they need to see and modify, regardless of how the data is stored. In addition to breaking the one-document paradigm, XPages contain numerous options and are very powerful.

Before diving into the details, keep in mind the following:

  • Xpages are included in Domino 8.5 and Domino Designer 8.5, but not earlier versions.
  • XPages are visible only via the Domino Web browser interface. Your Domino server must be running the HTTP task and you cannot use XPages in a Notes client application.
  • To run an XPage, you must change the server's default security settings. Go to the server's names.nsf -> Configuration -> Servers -> All Server Documents -> <your-server> -> Security -> Sign agents or XPages to run on behalf of the invoker. Add the name of the person who last saved the XPage. In our example, that will be you.

To look at a sample XPage, download this example and unzip the two .NSF files. Place those files into the data directory of a Domino 8.5 server and open xpages1.nsf with Domino Designer 8.5.

Within Domino Designer, go to the XPages category for the database. You will see one XPage named XPage1. Double-click on XPage1 to open it. Within XPage1, there is some plain text and two embedded view controls. Next, follow these steps:

  • Click in the upper-left corner of the first view control to select the entire control.
  • In the lower portion of the screen, select the Properties tab, then the Data sub-tab.

    This panel controls what data appears in the view control. Note that it references a view in this database named View1.

  • Click on the left-hand column of the view control, then look at Properties -> View Column. This column displays the plain text value of the data.

    You can also see that the column can be set to display a link to the underlying document, allowing the user to click on the display and open the document.

    Note: This sample is missing some additional features needed to work fully.

  • Scroll down to the second view control, click in the upper left corner to select the entire control and choose Properties -> Data.
  • This view control displays View1 from the other sample database: xpages2.nsf.
  • Use the database picker button to change the server name for xpages2.nsf from my server's name to yours.
  • Save and close XPage1. Be sure to save it under an ID that matches the security setting mentioned above.

Next, look at the databases with Lotus Notes 8.5.

  • Open each database. Notice that it contains a single view, single form and a short list of documents.
  • Examine the launch property of xpages1.nsf. To do so, right-click -> Application -> Properties -> Launch tab. Notice that the browser launch is set to use XPage1.

Finally, run the full sample from a Web browser to see your newly created XPage in action.

  • In the browser address bar, enter http://nnn.nnn.nnn.nnn/xpages1.nsf , where nnn.nnn.nnn.nnn is the IP address or name of your test Domino server.
  • You should see that xpages1.nsf opens directly to the XPage that you examined and that it displays two views -- one from each database.

Although this example is quite simple and does not include features to combine multiple documents or modify data, it provides a decent framework that you can experiment with and modify.

As Domino Designer 8.5 displays an XPage, all of the controls available to the developer are shown along the right-hand side of the screen. You can modify my basic example with these controls to perform additional operations.

ABOUT THE AUTHOR:   
Chuck Connell
Chuck Connell

Chuck Connell is president of CHC-3 Consulting, which helps organizations with all aspects of Domino and Notes.
This was first published in June 2009

Dig deeper on Lotus Domino Designer

1 comment

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchDataCenter

SearchExchange

SearchContentManagement

Close