Section 3.3. Sharing Information Between Web Parts


3.3. Sharing Information Between Web Parts

SharePoint Services Web Parts can communicate with other Web Parts. Web Parts can be connected and synchronized to each other and to external data sources. The SharePoint architecture supports connection interfaces that allow you to configure one Web Part to provide information and another to consume it.

For example, at your company's human resources team site, each employee's file might contain the scheduled dates for performance reviews. The Employee File document library would pass the scheduled dates to the announcement Web Part. The announcement list would automatically retrieve new review dates from the Employee File document library and update itself accordingly.

3.3.1. Providing Information to a Web Part

To provide information to a Web Part:

  1. In the design mode of your team site, click on the down arrow of the Web Part that will provide the information (for example, the Employee File Web Part).

  2. In the pop-up menu, select Connections Provide Row To and select the Web Part that will consume the information.

Figure 3-6 shows how you can configure a Web Part to provide information to another Web Part without writing any configuration code.

Figure 3-6. Configuring the Employee File Web Part to provide information to the Announcements Web Part


The actual code that sends and receives events is beyond the scope of this book. However, you can work with your developers to create custom Web Parts that provide additional communication options within your Windows SharePoint Services sites.


The Employee File Web Part will now broadcast information to the announcements Web Part.

3.3.2. Consuming Information from a Web Part

Not only do you have to establish the link from the provider Web Part (the Employee File) to the consuming Web Part (the announcements list), you also have to tell the consumer Web Part how to use the information. In this example, you want the announcements list to display a new row based on the data sent by the Employee File Web Part.

To consume information from a Web Part:

  1. In the design mode, click on the down arrow of the Web Part that will consume the information (for example, the Announcements Web Part).

  2. In the resulting menu, select Connections Get Sort/Filter From and select the Web Part that will provide the information (for example, the Employee File Web Part).

Figure 3-7 shows how you can configure a Web Part to consume information from another Web Part without writing any configuration code.

Figure 3-7. Configuring the announcements Web Part to consume information from the Employee File Web Part




    SharePoint User's Guide
    SharePoint 2007 Users Guide: Learning Microsofts Collaboration and Productivity Platform
    ISBN: 1590598296
    EAN: 2147483647
    Year: 2005
    Pages: 62

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net