Lotus: Cross Page Wires

THEMES: Lotus\Notes/Domino 8 | Lotus\Composite Appl...
YEAR: 2007
Login Login
User: Anonymous


LABEL: Composite Application | Lotus Notes 8 | Lotus Notes API
ORGANIZATIONS: IBM
 

Comments/attachments: Close
 
Resources
Cross Page Wires
http://www-03.ibm.com/developerworks/blogs/page/CompApps?entry=cross_page_wires&ca=drs-bl

As Bob wrote some time ago Lotus Notes 8.0 and Lotus Expeditor 6.1.1 will support cross page wires. As a sample I've modified this tutorial by removing the tag cloud component and putting the Notes forum component on a second page. I then created a cross page wire from the contacts view component to the Notes forum component.



Now when I select another view entry in the contacts view the second page comes up with the documents of the currently selected person. [In a real application however you probably don't want to switch to the second page whenever you select another contact. You could e.g. then publish the property in the Queryopendocument event instead to open the second page instead of the contact document.]

While the automatic page navigation is desired in some use cases you might also want to do a 'cross page wire' without page navigation. For instance in the sample above you might want to navigate manually to the second page via the out of the box page navigator whenever a user decides to do so. In this case you could still open the contact documents from the contacts view. This behavior is currently not supported out of the box by Notes/Expeditor (and neither on Portal).

However as a pattern you can use the following technique that we implemented in one of our samples and that I hope we'll be able to document later. You can use a hidden 'cross page wire' (Eclipse) component that you embedd on both pages. This component provides an action to consume the same property that the action on page two expects. It also publishes the same property. Then you can create two wires. One wire goes from your actual source component to the 'cross page wire' component on page one. The second wire goes from the 'cross page wire' component to the actual target component on page two. The trick is that the 'cross page wire' component always stores the last received property from the source component. Additionally it publishes this property whenever the second page becomes visible. You can use standard Eclipse perspective listeners to do this.

Niklas