• Browse Blogs
  • My Blog
  • My Updates

+Tags Get help with tags?

+ Similar Entries

photo

Adding Pager Icons i...

Blog:  Paul's Domino...
Paul Hannan
Updated 
No RatingsRatings 0     No CommentsComments 0
photo

Dojo gets a new home...

Blog:  Erik Brooks
Erik Brooks
Updated 
No RatingsRatings 0     No CommentsComments 0
photo

Project Klingon: Vul...

Blog:  Beyond The Ye...
Peter Presnell
Updated 
No RatingsRatings 0     CommentsComments 3
photo

What I think I've le...

Blog:  Notes from th...
Jerry Shelley
Updated 
No RatingsRatings 0     CommentsComments 2
photo

Notes 8.5.2 First Sh...

Blog:  Beyond The Ye...
Peter Presnell
Updated 
No RatingsRatings 0     CommentsComments 3

+ Bookmarks

+ Blog Authors  

Creating a NotesPreviewPane with XPages

Peter Presnell |   | Tags:  xpages | Comments (0)  |  Visits (653)
I was so frustrated with my lack of progress these past two days I decided to take my project home as a homework assignment.  I am not sure what it was but suddenly things started to click.  Perhaps getting my XPage design onto my 30" monitor allowed me to see the problems more clearly.  Eventually I was able to get the interim solution I had been seeking... creating the typical Notes design pattern of a view with a preview pane.

I have read a lot of articles on Xpages over the past few days but didn't see any tutorials on this specific design pattern so I will outline the solution that was ever so painfully constructed....   I am sure I will refine this over time.  My first fingerpainting from kindergarten is unlikely to be hung at the Louvre.

Before starting you will need a view to display your data and at least one Xpage that can display the selected row in the view.
  1. Create a new Xpage
  2. For Preview Right add a table with one row and two colums.  For Preview Below add a table with two rows and one column.
  3. In the first cell add a view control and format the view to meet your needs
  4. Use the view properties to assign a value to "var"  e.g. rowData (this is found under All Properties)
  5. In the second cell add a Panel and assign it a name e.g.  NotesPreviewPane
  6. Place an Include Page control inside the panel and select the XPage you wish to use to display the data.
  7. Views do not have a generic onClick event so you need to create an onclick event for each view column you wish to trigger the preview.
  8. In the onClick event include code such as follows to save the UNID of the selected document in Session where it can be accessed by the other Xpage.
    1. doc = rowData.getDocument();
    2. sessionScope.manualID = doc.getUniversalID();
  9. In the event definition also set the Server options to Partial Update and select the Panel you defined for the preview (NotesPreviewPane).  This will trigger AJAX to be used so that only the preview pane is refreshed each time a new document is selected in the view.
  10. This is optional but setting the view column property to show values in this column as a link will ensure the cursor changes when the user hovers over the column indicating that this column is linked.
  11. Set document open mode to read-only (unless you wish to support editing)
  12. Modify the XPage used to display the data so that the documentID for the DataSource is computed using the formula sessionScope.manualID
The above can be easily extended to inspect the value of Form for the selected document so that the XPage used to display the data is computed based upon the Form rather than being static.

Adding an outline custom control to the left of the view control allows the Xpage to take on the look/feel of the traditional Notes client 3-pane UI that seems to be used by the vast majority of Notes Applications.  (I am not saying you should keep using this design pattern!)

My next task for this projects is to simulate the launch first attachment feature.  I am hoping that will be a lot less painful.
No RatingsRatings 0

Comments (0)

There are no comments to display Add a Comment Add a Comment

Previous |  Main  | Next
Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About