inside wss sample shots
TRANSCRIPT
Inside WSS sample shots2008-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=enThis 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.
Chapter01\cs\Hello_WSS_OM P.20
Console app that uses obj model
Chapter01\cs\HelloWorld P.26
A feature, that changes the name of a site and reverses it at deactivation.
1
Activated feature:
Chapter02\cs\CustomApplicationPages P.50
The feature creates 7 application pages of which 6 is on the site action menu:
2
\Layouts\<FeatureName>\ApplicationPage2.aspx P.56: Use SPGridView
3
\Layouts\<FeatureName>\ApplicationPage3.aspx P.56:
\Layouts\<FeatureName>\ApplicationPage4.aspx P.58:
4
5
\Layouts\<FeatureName>\ApplicationPage5.aspx:
6
\Layouts\<FeatureName>\ApplicationPage6.aspx:
7
Chapter03\cs\CreateNewSitePage P.65
Console app that creates a site page
Chapter03\cs\CustomSitePages
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
P.73
P.74
9
P.76
10
P.66
11
12
P.81
13
Chapter03\cs\CustomBranding P.97
A SiteCollection Feature with two demo pages reached from the Site Actions.
14
15
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
Chapter04\cs\LitwareWebParts 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="C:\Inetpub\wwwroot\wss\VirtualDirectories\80\bin"Add to web.config:
<SafeControl Assembly="LitwareWebParts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=74bad7277fe0d19e" Namespace="LitwareWebParts" TypeName="*" Safe="True" /><trust level="Full" originUrl="" />
From the Site Settings on the SiteCollection the webparts can be previewed from the webpart gallery:
17
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
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
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.
Chapter06\cs\AnnouncementsListConsole P.179
This is a console app that uses the obj model on the announcement list. Included is search.Just a sample.
20
Chapter06\cs\LitwareFieldTypes
This addin is not a feature, but deployed in - \TEMPLATE\XML\fldtypes_Litware.xml- \TEMPLATE\CONTROLTEMPLATES\CompanySizeFieldControl.ascx- LitwareFieldTypes.dll (in GAC)
P.194
It contains custom types (CompanySize) that can be added to lists and doclibsWhen adding it to a list it looks like this:
21
When creating a list item you see
When displaying the list you see
Chapter06\cs\LitwareTypes
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
P.186/195
Three Site Columns are installed
Also two Content Types are installed
23
The Content types contains: (First the “Individual”)
24
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
Now you can add both Content Types and Site Columns
26
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
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
Now the list can have added three different types of items with the columns seen above
29
A new Company
30
The feature installed also two preloaded lists. 1) Venders (uses only Company Content Types)
and 2) Customers (uses both Company and Individual Content Types)
Chapter06\cs\ContentTypesConsole
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
Chapter07\cs\DocumentManager P.220
A feature containing 4 app pages, 4 doclibs and 2 normal lists.
32
The 1st app page
P.222
The 2nd app page
33
P.227
Menu for the 3rd app page
The 3rd app page
34
P.243
The 4th app page
Chapter07\cs\Leadsheets 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.
Chapter07\cs\HelloDocx P.237
A Console app that creates a .docx on the fly…
Chapter07\cs\HelloDocxfromASPNET P.240
Same as above, but now from ASP.NET…
35
Chapter07\cs\PackageViewer P.245
A full functional utility to browse .docx files or other OpenXml files. Here it is the \LitwareLetterTemplate\ LetterTemplate.docx
Chapter07\cs\LitwareLetterTemplate P.250
Like the Leadsheet proj. A sample .docx that can be deserialized using a class made with XSD.exe
36
Chapter08\cs\HelloWorkflow 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 = @"SPVM\administrator";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
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
P.269
Select a task to edit
Edit the task – Click Edit Item
39
Set status Complete and supply a message
Now the WF status page shows WF completed
40
P.274
The WF design view looks like this:
There are green triggers, blue actions and white historylog entries.
41
Chapter08\cs\LitwareWorkflows 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 \Resources\LitwareApprovalWorkflowData.xml change userid: <Approver>SPVM\administrator</Approver>Compared to the last WF then two actions has been added: EnableWFModification and CompleteTask
42
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
P.300
Also here you get an extra WF initiation form, where you can make changes
The WF is now running:
44
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
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
On the WF status page you can see the comment from the approver
47
Chapter09\cs\HelloSiteDef P.321
This is plain none code files that are copied using xcopy to the 12Hive containing a new site definition.
48
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
Chapter09\cs\SolutionsDeployment 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
Chapter09\cs\WebConfigModificationConsole 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
Chapter10\cs\LitwareSecurity
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
When added to a page the webparts displays:- P.368: Elevated Privileges- Evidence- P.355: Security- P.375: User Account
51
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