This is screen shots from the samples from the book Inside Microsoft Windows SharePoint
Services 3.0 by Ted Pattison & Daniel Larson
The idea with these screen shots is to have a picture index to the book, which also gives view of what is
possible with WSS 3.0.
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Inside WSS sample shots
1. Inside WSS sample shots
2008-12-31
This is screen shots from the samples from the book Inside Microsoft Windows SharePoint
Services 3.0 by Ted Pattison & Daniel Larson (ISBN 9780735623200).
The idea with these screen shots is to have a picture index to the book, which also gives view of what is
possible with WSS 3.0.
The code samples are downloadable from
http://www.microsoft.com/mspress/companion/9780735623200/
The samples has been executed on a Virtual PC Image downloadable from
http://www.microsoft.com/downloads/details.aspx?FamilyID=1beeac6f-2ea1-4769-9948-
74a74bd604fa&DisplayLang=en
This VPC has been updated to Visual Studio 2008. This means that the samples (which are 2005
version) will be updated during the first load (of each solution).
The screen shots are from the older VPC with only Visual Studio 2005.
Each heading is a folder in the samples. After the heading a short description of the purpose follows.
Sometimes also an installation instruction is given if needed. Usually a install.bat file exists in the
solutions.
Chapter01csHello_WSS_OM P.20
Console app that uses obj model
Chapter01csHelloWorld P.26
A feature, that changes the name of a site and reverses it at deactivation.
1
8. Chapter03csCreateNewSitePage P.65
Console app that creates a site page
Chapter03csCustomSitePages
A Feature that adds two menus to the top navigation bar. You must activate this feture from the
SiteCollection site for it to install.
P.86
P.70
8
16. Move the mouse around on the page to discover what styles are in use. In this example the mouse
points to the site name in the upper left corner.
16
17. Chapter04csLitwareWebParts P.99
A SiteCollection Feature including 6 webparts.
The webparts are installed locally in the webapp, which requires following:
Before running install.bat correct the path to the path to your WSS sitecoll like here:
@SET BINDIR=quot;C:InetpubwwwrootwssVirtualDirectories80binquot;
Add to web.config:
<SafeControl Assembly=quot;LitwareWebParts, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=74bad7277fe0d19equot; Namespace=quot;LitwareWebPartsquot; TypeName=quot;*quot;
Safe=quot;Truequot; />
<trust level=quot;Fullquot; originUrl=quot;quot; />
From the Site Settings on the SiteCollection the webparts can be previewed from the webpart gallery:
17
18. P.110
Edit a page with a webpart template and add webparts to the zones
Three different webparts:
- Contact viewer: Searches site for contact lists and show their content
- P.106: Hello World
- P.120: User Control: Loads a user control (.ascx)
18
19. P.123
A verb webpart adds menu items to the edit webpart menu:
And in display mode:
P.115
Manually write feed for the RSS viewer:
19
20. P.126
The list feed webpart can provide feed to the RSS view webpart
The provider (feeder) reads the lists on the site, which are then fed to consumer (viewer).
The RSS viewer also uses verbs.
Chapter06csAnnouncementsListConsole P.179
This is a console app that uses the obj model on the announcement list. Included is search.
Just a sample.
20
21. Chapter06csLitwareFieldTypes
This addin is not a feature, but deployed in
- TEMPLATEXMLfldtypes_Litware.xml
- TEMPLATECONTROLTEMPLATESCompanySizeFieldControl.ascx
- LitwareFieldTypes.dll (in GAC)
P.194
It contains custom types (CompanySize) that can be added to lists and doclibs
When adding it to a list it looks like this:
21
22. When creating a list item you see
When displaying the list you see
Chapter06csLitwareTypes
This is a sitecoll feature that extends the company size field to a Site Column (a <Field> element).
This again enables the column to be added to a Content Type.
Also it enables the data type to be searchable in a whole site collection.
22
25. And the “Company”
Going back to the list from last solution one can now add all the Site Columns and the Content Types to
the list (although it might look messy).
But first Content Types must be enabled on the list
25
26. Now you can add both Content Types and Site Columns
26
27. It makes no sense to add the Company Size one more time, unless you want to use it as a sub
company size, even though it has been expanded to a Site Column. The original field is also a Site
Column now.
So let’s add Content Types. Both can be added at the same time
27
28. OK, the Content Types would not reuse the Company Size field. This was because it was added as a
column for this web only and not a Site Column. Unfortunately you cannot see on a column if it is added
as Site Column or just a field. But you know that if it is in a Content Type, then it must be a Site
Column.
After a little fiddling the field only Company Size was removed
28
29. Now the list can have added three different types of items with the columns seen above
29
31. The feature installed also two preloaded lists. 1) Venders (uses only Company Content Types)
and 2) Customers (uses both Company and Individual Content Types)
Chapter06csContentTypesConsole
This is a console app that uses obj model to add Content types to lists and populate them with items
and views. Just a sample.
31
35. P.243
The 4th app page
Chapter07csLeadsheets P.229
An Infopath sample. There is no .sln file.
The Infopath file .xsn is renamed to cab and extracted to SourceFiles
The dataset sourcefiles are then driven through XSD.exe to create the class in SchemaGeneratedClass
More code is in the book (p. 232) where the class is used in an ItemAdded() event to read the added
InfoPath file and write the content to another list.
Chapter07csHelloDocx P.237
A Console app that creates a .docx on the fly…
Chapter07csHelloDocxfromASPNET P.240
Same as above, but now from ASP.NET…
35
36. Chapter07csPackageViewer P.245
A full functional utility to browse .docx files or other OpenXml files.
Here it is the LitwareLetterTemplate LetterTemplate.docx
Chapter07csLitwareLetterTemplate P.250
Like the Leadsheet proj. A sample .docx that can be deserialized using a class made with XSD.exe
36
37. Chapter08csHelloWorkflow P.266
This is a sitecoll feature with a workflow.
Before building it, a hardcoded line with the userid of yourself must be corrected:
string UserAccountName = @quot;SPVMadministratorquot;;
After activating the feature, enable the WF (create a WF association) on a list or doclib (List Settings
– Workflow settings):
P.268
Manually start a WF on an item:
37
38. P.269
Select a WF to start on the item:
Now the WF is running – click on the “In Progress” link to go to the status page.
38
40. Set status Complete and supply a message
Now the WF status page shows WF completed
40
41. P.274
The WF design view looks like this:
There are green triggers, blue actions and white historylog entries.
41
42. Chapter08csLitwareWorkflows P.291: Custom Input Forms
This is a sitecoll feature with a workflow and a contenttype.
Before building it, a hardcoded line with the userid of yourself must be corrected.
In ResourcesLitwareApprovalWorkflowData.xml change userid:
<Approver>SPVMadministrator</Approver>
Compared to the last WF then two actions has been added: EnableWFModification and CompleteTask
42
43. P.294
After attaching a new workflow for a list like in the previous feature using /_layouts/AddWrkfl.aspx then
this feature has yet a WF association form:
P.299
Now instanciate a Litware Approval WF
43
44. P.300
Also here you get an extra WF initiation form, where you can make changes
The WF is now running:
44
45. P.302
Compared to the Hello WF then now there is the option to modify the WF. And the task title has been
renamed.
If you first go to the task list you will also see the previous task. Notice that the old task is 0%
complete. There was no code to set it to 100%, when the task was set complete!
45
46. P.307
Enter the task. Here you get a custom task edit form, where you only have to press Approve to
complete the task. Try to reject…
The Reject action does the same as the Approve action.
And this WF automatically sets both Status, %complete and Outcome properties. Nice. The old WF
did not set the Outcome property.
It is the extra WF activity CompleteTask that carries that outcome info back to the task from the WF.
46
47. On the WF status page you can see the comment from the approver
47
49. When created the site supplies 3 pages with a content webpart and an image webpart.
The three pages has been created from the same taemplate. It is only the webpart configuration that is
different. That happens in the ONET.XML
Chapter09csSolutionsDeployment P.366
This solution uses:
- Site pages from chapter 3
- Branding from chapter 3
- Webparts from chapter 4
- Types from chapter 6
- Localized .resx files from chapter 9
- Solution package from chapter 9
Chapter09csWebConfigModificationConsole P.344
This is a console app that can add or remove lines from web.config.
Just a sample. Nothing visual. The change has no practical effect for the web app. The path to the web
app must be corrected.
49
50. Chapter10csLitwareSecurity
This is a sitecoll feature that contains 5 webparts in the group “Litware Security Web Parts” using a
solution package for deployment.
To deploy: Run DeploySolutionPackage.cmd.
After that it is found in SPCentralAdmin:
After activating the feature following webparts are added:
50
51. When added to a page the webparts displays:
- P.368: Elevated Privileges
- Evidence
- P.355: Security
- P.375: User Account
51
52. P.369
The visitorTracker webpart is nonvisible on the page. Instead it creates a list on the site called
visitors and adds items to it whenever someone enters the page.
The End
52