O'Reilly logo

Professional SharePoint® 2007 Development by Tom Rizzo, Adam Buenz, J. Dan Attis, Matt Ranlett, Brendon Schwartz, Eli Robillard, Jeff Julian, John Alexander, John Holliday

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A.6. Using VSeWSS to Build List Definitions

VSeWSS allows innovative ways to manufacture List Definitions. You can create a new List Definition from scratch, also known as an explicit list, where only a list base type needs to be defined for VSeWSS to assimilate. You can also instantiate a new List Definition from a custom content type. If you instantiate a new list, you can consume the policy content type that was just created in order to build a new list, a very powerful feature for SharePoint development. When building a List Definition from a previously created content type, the content type you wish to base the list on is the only supplied argument (see Figure A-6).

Figure A.6. Figure A-6

The most important noticeable code difference between an explicit list and a List Definition based on a content type is located within the major definition file, schema.xml. The generated schema.xml file will define list information, such as fields and views, along with other granular list data. When building a new List Definition from an existing content type, under the <ContentTypes> parent element, in the <ContentTypeRef> child element, a reference is built into the content type GUID (see the following code).

<!-- GUID defined with the custom content type generator from VSeWSS -->
<ContentType ID="0x010100966c882da1884476bbfff3e10bbedfbb" /> <!-- Reference to custom content type GUID ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required