Web Parts as XML

This approach does not deploy the dashboard to a different server but instead allows you to save Web Parts to the local file system, and then import them into a dashboard project on the production server. After building and testing the Web Parts on the test server, you save the Web Parts on the local file system as Dashboard Web Part (.dwp) files, and then import them onto the dashboard on a production server.

To save the Web Parts and then import them onto the dashboard:

  1. Use Office XP Developer to create a new dashboard project on the production server.
  2. After creating the production server dashboard, use Office XP Developer to open the dashboard project stored on the test server.
  3. In the Solution Explorer, select the Web Part(s) to save to the production server.
  4. On the File menu, click Save Copy of * As (where * is the name of the Web Part selected).
  5. In the Save Copy As dialog box, in the Save as type list, click DWP file (*.dwp).
  6. Type a file name for the Web Part.
  7. In the Save in box, type a path on the local file system.
  8. Click Save.

XML is the interchange format for Web Parts. After you click Save, Office XP Developer saves the Web Part and its properties as XML with a DWP extension. It also saves any resources associated with the Web Part to a folder in the destination selected when you save the dashboard.

The following Web Part naming conventions allow you to write reusable and functional Web Parts to export and import from dashboard projects created by using Office XP Developer:

  • To associate a resources folder with a Web Part, follow the _Files naming convention. For example, if you name the Web Part MyWebPart.HTM, name the associated resources folder for this Web Part MyWebPart_Files.
  • You should use the Web Part Resource (_WPR_) token when referring to the resources folder of a Web Part. For example, if you want to render an image that you have imported into the resources folder of a Web Part, use the following naming convention: <img src="_WPR_\myImage.jpg">.


Microsoft Sharepoint Portal Server 2001 Resource Kit
Microsoft SharePoint(TM) Portal Server 2001 Resource Kit (Examples & Explanations Series)
ISBN: 0735615624
EAN: 2147483647
Year: 2001
Pages: 231

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