Home > Setting up a Domino 8.5 XPages example
Tutorial:
EMAIL THIS

Setting up a Domino 8.5 XPages example

14 Sep 2009 | SearchDomino.com

Lotus Notes and Domino tips, tutorials and how-to articles
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google

In my introduction to XPages in Domino 8.5, I included a basic downloadable example that displays data from a simple view. In a real application, you would also want to examine individual documents behind a view and possibly modify selected documents. This tip gives you the tools to do this.

To examine the new XPages sample, download it from my website and read my previous article for background information on how to install and run any database that contains XPages.

The value of this example is in seeing how this particular code works, while also serving as a test bed for your own experimentation. Install and run this example as is to make sure that it works. Then, you can modify or extend it for your own applications.

To begin, open the new database with Domino Designer and go to the XPages category. You will see two XPages: LaunchPage and Form1Page.

  • LaunchPage is a view-like page that will be displayed when the database is opened with a Web browser.
  • Form1Page is an XPage that acts like a Notes form and shows all fields in a single document.

Double-click on LaunchPage to open it. Within LaunchPage, you'll see some plain text and an embedded view control. Next, follow these steps:

  • Click in the upper-left of the 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 the database named View1.

  • Click on the left-hand column of the view control and look at the Properties/View column. This column displays the plain text value of the data and presents a link to edit the underlying document.
  • Save and close LaunchPage. Be sure to save it under an ID that matches the following security setting:

    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 this example, that will be you.

Double-click on Form1Page and you will see several labels and fields that are similar to those in a standard Notes form. Next, follow these steps:

  • Click outside of the table to select the entire page.
  • In the lower portion of the screen, select the Properties tab, then the Data sub-tab.

    Note that the page is bound to the Notes form named Form1 in the current database.

  • Click on each of the three fields in the table. For example, if you look at Properties/Data, you'll see that each is bound to the matching Notes field from Form1.
  • Click on the cell that contains the Submit button – do not click on the button itself. Choose Properties/All Properties below to see the Rendered property. This computed value hides the submit button when the page is opened in read-mode.
  • Save and close Form1Page, making sure to save it under an ID that matches the aforementioned security setting.

Next, look at the database with Lotus Notes 8.5.

  • Open the database, which contains a single view, one form and a short list of documents.
  • Right click on -> Application -> Properties > Launch to examine the launch property of xpages3.nsf. The browser launch is set to use the XPage named LaunchPage.

Run the full sample from a Web browser to see XPages in action.

  • In your Web browser's address bar, enter: http://nnn.nnn.nnn.nnn/xpages3.nsf, where nnn.nnn.nnn.nnn is the IP address or name of your test Domino server.

    Notice that xpages3.nsf opens directly to the launch page that you examined and that it displays a view containing the documents of the database.

  • You can see that the left-hand column of the view contains clickable links. Clicking one should open the underlying document, using the XPage named Form1Page.

    You can modify the data in the document then press Submit.

  • After doing so, you may need to use the browser's Back button a couple times to return to the launch page and refresh the page to see the modified data.

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.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Lotus Domino Designer
An introduction to using XPages in Domino 8.5
Top 10 Lotus Notes/Domino coding and development tips of 2008
'Customize this view' options are disabled in Lotus Notes databases
Stop response documents from showing in a Lotus Notes form
Set a value in a field existing in another Lotus Notes database
Display Lotus Notes fields as separate entries in one column
An introduction to Lotus Domino Designer
Modifying LotusScript code for date and time handling
Creating custom Lotus Notes Domino login forms
Using LotusScript to retrieve names of fields on a Lotus Notes form

Lotus Domino Server 8
Build your own Domino multi-server test environment
Four-step application rollout with Notes 8.0.1 Widgets
An introduction to ID Vault in Lotus Notes/Domino 8.5
Ensure maximum performance from virtualized Lotus Domino servers
Build a complete Lotus Domino 8.5 server for $400
Benefits of virtualizing Lotus Domino servers
Configuring Domino Domain Monitoring (DDM)
How to move Notes databases off Domino 8 servers and save disk space
LotusLive spurs IBM's entry into the hosted services market
An introduction to Domino Domain Monitoring (DDM)

Lotus Notes 8
Clear Recent Contacts view and prevent repopulation in Lotus Notes 8.x
Using Domino Administrator to manage client settings
Four-step application rollout with Notes 8.0.1 Widgets
IBM Lotus to end Notes/Domino 7.x support
An introduction to ID Vault in Lotus Notes/Domino 8.5
Are you ready for LotusLive hosted email services?
JavaScript workaround fixes Lotus Notes 8.x PostOpen event issue
LotusScript code rebuilds corrupted busytime.nsf file
LotusLive spurs IBM's entry into the hosted services market
An introduction to iNotes for Lotus Notes/Domino 8.5

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary




Lotus Notes Administration Solutions for Performance, Monitoring, Mailbox Management and Synchronization
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts