Connecting Data in your Web Parts (v 1.3)

The Confluence SharePoint Connector supports SharePoint's web part connections for the two web parts provided by the connector:

  • Confluence Pages Tree View web part: This web part allows another web part to provide it with the space key so that it can display the hierarchy of pages for the given space.
  • Confluence Page web part: This web part allows another web part to provide it with the Confluence page ID so that it can display the Confluence page.

(info) Web part connections work in the same way for both SharePoint 2007 and SharePoint 2010. The screenshots below are from SharePoint 2007, and it's easy to apply the same guidelines to SharePoint 2010.

Connecting the Pages Tree View and Page Web Parts

The most common scenario for connecting the Confluence web parts is setting up a Page web part to display the content of a page selected in a corresponding Pages Tree View web part.

Screenshot: Confluence Web Parts Connected Together

  1. Create a web part page, go into edit mode on the page.
  2. Add a Confluence Pages Tree View web part.
  3. Confluence the tree view web part to display the pages in a specific Conflunence space.
  4. Add a Confluence Page web part.
  5. Edit the connection of the Page web part and set its provider to the Tree View web part.
  6. Save/Check-in/Publish the page.

A Simple Example using the Confluence Web Parts

A simple scenario is to use a list web part that contains the space key and/or the page ID that can be passed to the Confluence web parts. Below we show an example of this scenario. When viewing the SharePoint page, the user clicks a radio button to choose an item in the list. The list web part passes the corresponding space key and/or page ID to the web parts below the list.

Screenshot: Web Part Connections

Take the following steps to reproduce the above scenario:

  1. Create a SharePoint custom list with 2 fields: a space key and a page ID.
  2. Create a web part page, go into edit mode on the page, and add the following to the web part page:
    • The list web part you have just created.
    • A Confluence Page web part.
    • A Confluence Pages Tree View web part.
  3. Edit the connection of the Confluence Pages Tree View web part and set its provider to the appropriate field (space or page ID) from the list, as shown below.

Screenshot: Making a connection

Screenshot: Configuring the connection

Other SharePoint Web Part Connections

SharePoint provides some out-of-the-box web parts that specialise in connections, such as the Filter Web Parts that come with the Enterprise version of MOSS 2007. You can configure such a filter web part to obtain the space key or page ID from different sources and provide one of them to the Confluence SharePoint Connector web parts. Here are some of the filter web parts in MOSS Enterprise 2007:

  • Business Data Catalog Filter – can provide a space key or page ID taken from a database or web service.
  • Choice Filter – can provide a hard-coded choice of space keys from which the user can choose.
  • Page Field Filter – looks at fields stored with the current web part page (in a Pages document library, for example) to provide their values.
  • Query String Filter – can provide values from the query string.
  • SQL Server 2005 Analysis Services Filter – can provide values from SSAS.
  • Text Filter – allows the user to type in a value that can be passed.

Technical note: The Confluence SharePoint Connector web parts consume the IWebPartField interface. This is one of the interfaces provided by list web parts and filter web parts. You can create your own web part and have it provide data through this interface as well.

RELATED TOPICS

Using the SharePoint 2007 Web Parts
Using the SharePoint 2010 Web Parts