Blog of an overweight SharePoint addict

Wed 4 Mar 09

SharePoint Dispose Checker Tool

Filed under: General, Programming, SharePoint, Visual Studio 2005 — Reginald @ 11:51 am

The Microsoft SharePoint team have released a SharePoint disposal checker tool to the MSDN community. This command line tool scans individual asseblies, or entire directory structures and analyses the code for memory leaks through poor disposal.

I ran it against some of my assemblies and I’m happy to say only my quick command line tools written for testing exposed any poor disposal issues.. (Mainly because I don’t bother worrying about disposal when I’m just testing constructs..)

The project site can be found here with further links to the team behind the tool.

http://code.msdn.microsoft.com/SPDisposeCheck

Reg.

Tue 3 Mar 09

List view Web parts… No folder breadcrumb

Filed under: General, SharePoint — Reginald @ 8:56 am

One thing that has always confounded me is the lack of a breadcrumb in List View WebParts.

Picture the scenario, You drag a Document library list view onto your web part page. fine no problems there. You click on the first folder, down one level, then another, Then perhaps one more.. Hang on, I thought folder structures should be a thing of the past? Ah well, the document I want isn’t here, I’ll go back up a level.. (I should have used searched shouldn’t I?).

Hang on.. how do I get out of here.. help.. let me go back up a level..I can’t.. I’m stuck!!!!!!!!!! Waaaaahh.. Page reload.. ah I’m back at the top, all calm again…

So how do we get around this problem? Well in the first instance, lets avoid the use of folders where possible, but in some implementations, it’s just not possible, afterall, users are familiar with the concepts of folders and hierarchical structure.

This was the problem set to me by a client recently and solving it is a quite interesting problem that I’m part way through solving.

So I have two approaches, the first one is brought about by the realisation that when you place the list view on a publishing page, and drop down a folder level, a querystring is placed into the URL that shows the current folder location. Fine, we can probably parse that out and use the locations to create a breacrumb, but for some reason it doesn’t root itself in the library itself, but the parent of the website itself.

E.g. http://website/sub-web/Forms/Forms Library/First folder with the querystring showing /sub-web/Forms/forms Library/First Folder (Note: Both sub-web and forms are websites within a publishing collection.)

So not perfect, Also, what happens if we have mroe than one list view web part on the page? (I’ve not investigated that one yet..)

The second option is to get a connection into the Page WebPart manager and see if we can find out any information on the current folder from the List View Web part itself.. The jury is out on this one..

So watch this space for some code very soon..

Reg.

Powered by WordPress