Blog of an overweight SharePoint addict

Wed 3 Feb 10

New Year, New Start?? Balony!

Filed under: Uncategorized — Reginald @ 4:14 pm

Judging by the date, things haven’t changed much for me at the moment. Since getting back from SPC09, work has been Manic! I’m generally leaving on a Sunday night to head to the West Country, then coming home and heading to the Midlands the next day, before heading back to the West Country towards the end of the week. The end result, no downtime or train time to actually get some things written up.

For instance I attended the Nottingham region SUGUK evening a couple of weeks ago, with Sam Dolan and Penny Coventry presenting on branding with SharePoint. pointing out the pain points and some of the gotchas. One of the things that Sam pointed out is don’t let a dev do your design, Get a designer in.

Being a Dev who brands quite a lot, I actually do agree with this philosophy. if you want your ready designed marketting brand applied to your SharePoint site, then I can do that without any problems. If you want a site that’s been designed like the Ferrari site, then you need to bring a Designer in.

Overall a worthy evening with a good attendance regardless of some of the weather that mother Nature has thrown at us recently.

Workwise I’ve had some very interesting projects on recently, several of which are very blog worthy as I found it very difficult to actually find information on the net that covered exactly what i was trying to do. If I get some time over the next week or so, I’ll try to get these written up, but looking at past performance, these may wait a while.. let’s see.

Some of the techniques that I’ve touched on recently though have been fun to research, Cascading Drop Down lists without a post back to the server, Sourcing the data for these from a data table and using LINQ to select what’s required, Custom Search query and results webpart using the Keyword model. I think I need to create one big custom project and put all of these into it as a learning experience that I can draw on in 6 months time when I’ve forgotten it.

Watch this space, I won’t leave it so long this time..

Sun 5 Jul 09

Pre-populating the BDC item picker in an application page

Filed under: BDC, Programming, SharePoint, Uncategorized — Reginald @ 5:21 pm

Adam Toth wrote a very good article on his old blog about using the BDC Entity Picker in an application page. Click here for the article.

What Adam didn’t cover however is what happens if you want to pre-load that picker with some information. In my instance, I was copying a list item with BDC data in it and wanted to allow the user to view and change the selected BDC field.

It turns out that it wasn’t as difficult as I was expecting, and after some research in the SDK about the BDC Item picker I was able to produce the effect I wanted.

I’m going to assume that you’ve followed Adam’s guide thus far and have been able to get the BDC Itempicker on your page and have it talking properly to the BDC (E.g. you can search for an item and have it populate the picker.) If you haven’t got this far, go and do that first as it’s fundamental to what we’re going to do.

So in my scenario, The list item has a BDC field for Client name. The first thing that you need to understand is how SharePoint stores the BDC Field data in the SharePoint list. I was expecting to have a new field type to play around with, but No, it’s much easier than that, you get two strings. One for the display value and one for the Entity key.

In my BDC application definition, I have an entity called dbo.Customers and this has already been added to the list definition as a Business Data column. If you write a quick console application to browse through the field names, you’ll find 2 fields, one called “Client” frm the field definition in the list and one called “dbo_x002e_Customer_ID” (This latter one was added when the field was configured.)

So with the values of these two fields we can create a PickerEntity which can be understood by the BDC Itempicker.

The PickerEntity was declared earlier in the code and then is used as follows:-

if (item["Client"] != null)
{
    if (item["dbo_x002e_Customer_ID"] != null)
    {
        peClient = new PickerEntity();
        peClient.DisplayText = item["Client"].ToString();
        peClient.Key = item["dbo_x002e_Customer_ID"].ToString();
        bdcClientSelector.Entities.Add(bdcClientSelector.ValidateEntity(peClient));
    }
}

Hopefully this will help demystify the Itempicker a little..

Paul.

Thu 7 May 09

Using JQuery to remove Linked List Items Hyperlinks – Revisited

Filed under: JQuery, Javascript, Programming, SharePoint, Uncategorized — Reginald @ 11:36 am

So in an earlier post I talked about using JQuery to remove the A tag that is automatically included in the rendering of a linked list item in display mode.

I really liked this solution as it avoided having to go to the lengths of writing a custom field to solve this and can be targetted at a single page, or a whole site by embedding the code in the Master Page.

So, anyway, it’s worked quite nicely at the client that instigated the investigation, so I decided to re-use the code for a new client. This has functioned perfectly, right up to the point where they used a list view with a Group by in the selected view.

So, why does this cause different behaviour? Well the answer is in how the ListView web part handles the hiding and revealing of the grouped data. When you click on the expand link, the page performs a partial postback to SharePoint to get the missing data, before returning a block of HTML to display.

As this happens during the partial postback, the already registered code on the page doesn’t run a second time as the jQuery event $(document).ready doesn’t trigger again.

I tried various methods before placing a post on the EndUserSharePoint.com StumpThePanel Q&A forum in the hope that “JQuery in SharePoint” god Paul Grenier would be able to answer my timing issues, which he did very nicely!

So how did we resolve it.. The answer is to replace the MicroSoft function that handles the posted back data within the listview ExpGroupRenderData() with a JQuery version.

function ExpGroupRenderData(htmlToRender, groupName, isLoaded) {
	$("#tbod"+groupName+"_").attr("isloaded",isLoaded)
		.html(htmlToRender)
		.show("fast",HideLinkedListItems());
}

HideLinkedListItems() is the previously created function to strip the A tag frm linked list items, wrapped in a function wrapper so that it can be called frm either the update, or the Document.ready as per the original post.

The result, expanding the listview now presents the list view items, nicely stripped of their links.

I hope this helps someone achieve the same..

Paul.

Tue 14 Apr 09

European SharePoint Best Practices Conference

Filed under: Uncategorized — Reginald @ 7:56 am

Well last week saw the first European SharePoint Best practices conference organised by Combined Knowledge here in London.

The event, located at the QEII Conference centre in Westminster was exceptionally well run by Combined Knowledge, Steve and the gang certainly know how to run a user event and all of the staff from CK and the red coats were exceptional. Zoe as always had all the information needed to hand and is my personal favorite for saving me from the Headache from hell!

As to the sessions themselves, I followed the dev track religiously as there are several areas that I’ve been keen to improve on.

The first session featuring the somewhat ‘manic’ Todd Bleeker was exceptionally entertaining and enlightening and set the scene for the conference to come. Todd manages to bring his love of SharePoint and desire to spread the word of development joy to the world with the enthusiasm of a Baptist Revival Minister. A throughly engaging man, I had the pleasure to spend an hour during one of the sessions with Todd showing me how to use his none ajax method of preventing full page post backs using the ICallBackEventHandler, something that I will be making use of in some of my webparts this very week to fully understand it.

Further sessions from such well known US based speakers as Andrew Connell (on Field controls and webparts in publishing sites, Star Wars references were a hoot!!), Eric Schupps (on Custom Site definitions and High Performance applications.. I used a method from this at a client last week and decreased page load times by 20%!)

And our very own home grown talent in the form of Chris O’Brien (Deployment methodologies), Andrew Woodward (TDD and SharePoint in education) and Ben Robb (Customising the Search UI)

And the final sessions of day 2 and 3 were the open mike Ask the Experts panel. Judging by the comments received from people in the other sessions, ours was the best attended and certainly the most fun. Each of the speakers were happy to be challenged by the audience and I gained an great insight into some of the subjects discussed.

Overall, for my first ever Conference, I found this event to be possibly the most value for money training event I’ve attended, with a great return on investment!!

Regards

Paul.

Fri 18 Apr 08

State machines cont….

Filed under: Uncategorized — Reginald @ 4:04 pm

Well I’ve had some fun doing the layout of the workflow onto the state machine designer page. It’s certainly a very different feel to building the Sequential style of workflows and I can understand why anyone who has developed the state machine workflows always says, ‘mess around with Sequential ones first”.

There is a very different feel to the designer when working on the State Machine WF, it feels quite disconnected once you start drilling down into the various state containers and can be a little hard to picture until you return to the top down view and can see the various state changes in line form on the designer.

In order to try the SM workflows out, I’ve decided to port the Finalisaton workflow from our current system into the SM way of working. This fits with the project as the finalisation never reached live owing to the repeated changes requested by our finance team. therefore I’m almost at the blank canvas stage which is a great place to start.

Well so far I have the basic workflow design layed out on the canvas, I’ve got the initialisation underway pulling in both association data and initiation data from the XML data in the workflow, The task logic is almost complete and the task creation is almost there. I’ve had to leave it at the point with copious notes in the code ready for when I can return to it next week.

Watch this space for a report on how the first deployment goes and what I’ve learned about state machines!

Thu 17 Apr 08

Time for a state machine?

Filed under: Uncategorized — Reginald @ 8:51 am

The library summary webpart that I’ve been working on over the last week is now at a point where I can put it in front of the UAT board and show them the different flavours. Flexibility was the key with this part as I wanted to avoid having to keep re-writing webparts for each different team.

I’ve used personalisation menus quite heavily with this one and it’s working quite nicely, even if some of the logic within the code has to be quite convoluted.

Anyways, the UAT meeting isn’t until this afternoon, so yesterday I decided to take a look at a state machine workflow.

I found a fairly good walkthrough on the net that seems to cover the ground quite nicely, available here:- Matt Morse – State Machine

I’m adapting the basic walkthrough to meet my requirements, Hopefully I’ve built up enough knowledge on the workflows to get this working without doing a sandbox first, but we’ll see.

Thu 6 Mar 08

Recommended Reading..

Filed under: Uncategorized — Reginald @ 8:47 am

Ok, thanks to Amazon’s associates stores, I’ve put together a collection of recommended books for those starting down the SharePoint development track.

Reg’s Recommended Reading List

Take a look!

Reg.

Thu 20 Dec 07

Spam users..

Filed under: Uncategorized — Reginald @ 3:57 pm

I’ve just been through and deleted several hundred accounts that have been created by obvious spam users. My spam filters are rpetty good and prevent them posting anything, but they still create accounts….

Apologies if anyone has had their account removed in error, I only deleted the obvious looking ones, but you never know..

Tue 13 Nov 07

Conundrum Solved:- Almost..

Filed under: Uncategorized — Reginald @ 9:51 pm

Well, I’ve fixed the problem with checking for locks, the SPListItem has a reference to the underlying SPFile object. This permits you to use SPFile.CheckOutStatus to check.

I have written a long post about how to use this, but for some reaosn the code in it upsets Wordpress, so I’ll get a new code add-in sorted and will post it shortly.

Wed 25 Apr 07

Result!!

Filed under: Uncategorized — Reginald @ 10:32 am

Well I took the exam.. And found that the study work I put in has paid off.. oh and probably the last 9 months playing with the Beta and the RTM versions..

890 points I got, with a pass mark of 700, so I was happy. I think my knowledge of Kerberos and Multi/Unicasting is what let me down and stopped me getting the full 1000!

Older Posts »

Powered by WordPress