WSS 3 / MOSS Creating Views in CAML (List Definition)

November 6th, 2008 No comments

I have been creating custom Lists in CAML for deployment by features.  As you do.  I found out a few things that might be of help when you are creating them yourselves.

I am  Assuming that you now how to create a list template and know what goes in a schema.xml to a point.

Concentrating solely on views here I found out this.

If you have a List View WebPArt you need one of these types of views, if you don’t LVWP don’t work.

<View BaseViewID="0" Type="HTML">….</View>

Careful of BaseViewIDs being the same.

<View DefaultView="TRUE" SetupPath="pages\viewpage.aspx" Type="HTML" DisplayName="Summary" Url="Summary.aspx" Level="1" BaseViewID="1" ContentTypeID="0x"
            ImageUrl="/_layouts/images/generic.png" WebPartZoneID="Main">

<View SetupPath="pages\viewpage.aspx" Type="HTML" DisplayName="Summary"  Url="Summary.aspx" Level="1" BaseViewID="1" ContentTypeID="0x"
            ImageUrl="/_layouts/images/generic.png" WebPartZoneID="Main">

Notice that the BaseViewID’s, that wonderful field that’s barely documented, if they are both the same number then you might get problems.  I can’t explain why, but In my views I created the second view had a different Query but was ignored when created and it copied the first views query.  When I changed the BaseViewID=2 on the second view everything worked.

Is that the right thing to do ? I can’t say I’m only commenting on what I have observed.

Don’t do this

<View DefaultView="TRUE" SetupPath="pages\viewpage.aspx" Type="HTML" DisplayName="Summary" Url="Summary.aspx" Level="1" BaseViewID="1" ContentTypeID="0x"
            ImageUrl="/_layouts/images/generic.png" WebPartZoneID="Main">

<View DefaultView="TRUE" SetupPath="pages\viewpage.aspx" Type="HTML" DisplayName="Summary"  Url="Summary.aspx" Level="1" BaseViewID="1" ContentTypeID="0x"
            ImageUrl="/_layouts/images/generic.png" WebPartZoneID="Main">

If you forget when you cut and paste if you have two default views in the "Lists" page it shows up twice, its not really there twice but looks like it is.  You may not notice till too late with this one.

 

Categories: development, Sharepoint Tags:

Handy WSS / MOSS Debugging hint

November 6th, 2008 No comments

I’ve just had a chat with a colleague who was struggling to make one of our installers work.  Which reminded me of the WSS course with Todd Bleeker I was on regarding debugging and quickly trying to debug or attach to stsadm and Studio just isn’t playing.

Read more…

Categories: development, Sharepoint Tags:

My SPQuery doesn’t work

October 23rd, 2008 3 comments

I had my first tortuous experience with SPQuery today and found out a few things.  Now this isn’t a full explanation of SPQuery, I suggest Ted’s book for that. But there is the answer to a couple of gotcha’ s that can truip you up

Read more…

Categories: development, Sharepoint Tags:

WSS3 – ControlTemplates, Won’t load ?

October 22nd, 2008 No comments

Whilst developing an app for wss3/moss I had some trouble and I thought I’d share it.

One of the great things about new sharepoint is Delegate controls.  If in your masterpage or other page you have a SharepointDelegateControl in there you can plonk your own replacement version in there.  There are essentially placeholders for you to use for branding.

Now when I develop for wss I separate everything into various folders and name them appropriately usually in a namespace Style.

e.g.

My Feature could be called   BinaryJam.MyApplication

Read more…

Categories: Uncategorized Tags:

New Camera / Windows Live Gallery / Silverlight / PhotoSynth.

September 3rd, 2008 No comments

imageI got a new camera, its a Canon EOS 400D (EOS Digital Rebel XTi).  So I’ve been having a play.  I’m no David Bailey by any means so I’ve been experimenting with it and things I do know something about.  Tech.

First Windows Live Gallery.  This is now my preferred photo management software.  I pull photos off cameras with this and let it organise the folders.  I use it for tagging my photos and viewing them quickly or using the search function and tags to locate specific photos I want to see or print.  I used to to Picasa2 but have now switched, Picasa2 was great and for bulk tagging fantastic, still better than gallery for that, but I only want one of these things on the machine so I dropped it.

Live Gallery has a great built in Flickr uploader that works far better than Flickr’s own, it even sends the tags up so no more lost tags.

Read more…

Categories: Uncategorized Tags:

KES?

July 27th, 2008 No comments

IMAGE_019

Today is sunday and the view in the picture is my street from the car when I just got home from swimming with J.  What the picture doesn’t show because stupid camera phones are too slow is the bird of prey. 

Our street is full of house martin nests in the eaves of the roofs.  What I think is a  kestrel seems to have got wind of this and I watched one pull a house martin right out of the air then claw it into the tarmac where it sat for a few minutes on the pavement corner right in front of me, it was my getting out of the car that scared it off, lunch in claw.

I just thought it was amazing to see a bird of prey in the burbs. 

I’m hoping kes will come back later tonight when the swifts are most active catching insects.

Categories: Misc Tags:

Sharepoint – WSS 3 / Moss

July 15th, 2008 No comments

Having recently attended a developer course in Wss3 development I intend to update many of the old 2003 web parts and techniques I had previously developed.  However I have a backlog of stuff to clear at work and no environment to build them on as yet.  When I get time and VPC sorted I will get round to it.

So anyone interested in sharepoint might want to subscribe to the sharepoint category of this blog (or not), rather than read the trite and silverlight and sap and other stuff.

Categories: Sharepoint Tags:

Cats

July 1st, 2008 No comments

Cat went under the knife again, more teeth out.  She’s fine and apparently has kidney and liver function far in excess of a cat of her advanced years (16) and will most likely live a lot longer.

The cats are part of the family so despite no pet insurance I keep paying for the treatments.  I can’t “youth” my cats.

Now she’s home and getting better, I’m glad and fuss her endlessly.  However it makes me think why the hell did I get cats  in the first place.

Read more…

Categories: Misc Tags:

Best Silverlight Demo so far

May 8th, 2008 No comments

image Whilst there have been some excellent demos out there and Im thinking Hard Rock here, this is undoubtedly the best so far and demonstrates what Silverlight will be fantastic for

 

http://www.mscui.net/PatientJourneyDemonstrator/

 

This is RIA at its best.

 

Technorati Tags:
Categories: Silverlight Tags:

Some Tools a .NET developer should not be without

May 2nd, 2008 No comments

Recently I had the joy of trying to work with some Web Services from a 3rd party system not written in .NET.  In this age of full understanding of XML and Interoperability and Basic Profile 1.1 compliance  this was of course completely easy.

NOT!!!!

This was a complete pain in the neck.  I had problems at every turn.  Our existing .NET web service that provides a similar service, soon to be retired though, was written in .NET 1.1. So I just wanted to modify it rather than do an upgrade.  The remote system used  Http1.1 Chunked mode.  .NET 1.1 does not handle this.  So .NET 2.0 here I come (I know I know that’s still legacy !).

Read more…

Categories: development Tags: