Welcome to my blog, stay tunned :

Rating system now supports anonymous ratings

Hi,

I've extented the rating system for SharePoint Foundation in order to support anonymous ratings. So far, the system was only working with authenticated users.

The system is available on CodePlex at http://sptoolbasket2010.codeplex.com/

Happy Coding

Localization in SharePoint XSLT files used by custom field types

Hi,

If like me, you wonder how you can localize your SharePoint XSLT files, the ones you use in your custom field types and/or in your lists, here is how it works:

- You need to have a resource file, so for instance MyResource.resx, MyResource.en-US.resx and MyResource.fr-FR.resx
- You must deploy those resource files to the App_GlobalResources folder of the corresponding IIS web application. Now, you can easily do that with the new packaging mechanisms since SharePoint WSPs are now able to deploy directly in the web app folders.

- When those pre-requisites are respected, you can just use this:

<script language="JavaScript">
<![CDATA[
alert(']]><xsl:value-of select="$thisNode/../@resource.YourResourceFile.TheKey"/><![CDATA[';
]]>
</script>

in the "body" mode of your custom field type

and this, in the "header" mode of your custom field type:

<script language="JavaScript">
<![CDATA[
alert(']]><xsl:value-of select="$Rows/@resource.YourResourceFile.TheKey"/><![CDATA[');
]]>
</script>

This will grab the value of the key in the relevant resource file corresponding to the culture of the current web.

Happy Coding

Rating System for SharePoint Foundation

Hi,

I've eventually migrated my rating system to SharePoint 2010. Originally, I didn't plan to migrate it since SharePoint 2010 offers an out of the box rating solution but I didn't notice directly that this feature is only available in SharePoint Server and SharePoint Server Enterprise, not in SharePoint Foundation.

Therefore, because of that and also because of some requests on CodePlex, I decided to make an effort and to find the necessary time to make the migration.

SharePoint 2010 - Implementing a custom header pattern via XSL for a custom field type

Hi,

If you wonder how to implement a custom header pattern in XSL for a custom field type in either SharePoint Foundation or SharePoint Server, here is an example that you can download showing how to do.

In this little example, we'll implement a custom field type inheriting from Text that will show the number of entries having that same value within the list. You could achieve this by creating a view that groups the elements on that field & shows the totals but this is just to show an example :).

So, here is a screenshot of the functionality

When you click on the value contained in that specific column, you get an alert message showing you how many items in the list have the same value for that column. In this example, when you click on value 1, you get 2 since two rows contain this value as shown below:

SharePoint custom field type + XSLT rendering

Hi,

As you know already, SharePoint 2010 uses an XSLT engine to render views & custom field types. You can still use CAML views but it defaults to XLST.

I've just built a custom field type whose the parent type was "Choice". While building the corresponding XSLT, I didn't find the "mode" I was supposed to use...So, in case, the same story happens to you, an easy way to know which mode you're supposed to use is to examine the out-of-the-box file delivered with any SharePoint installation.

I'm talking about this file:

SharePoint conference at the Microsoft Innovation Center (MIC) on September 15

Hi,

I'll be presenting a session at the MIC on September 15 2010 along with a few others fellow SharePoint guys. The covered topics are quite exciting:

- SharePoint workflows
- Building BCS over custom WCF services
- InfoPath 2010
- Querying data in SharePoint 2010 (LINQ, CAML, RESTFUL) + using XLST to render views
- The Client Object Model (Silverlight, .NET & ECMAScript)

The full description & registration (it's free) page is available here :

http://www.fikket.be/mic/event/214

Happy coding!

Checking the current user permissions on a list object via the Client Object Model

Hi,

In regular server-side SharePoint coding, when we want to check whether the current user has specific permissions on a list, we can use the method SPList.DoesUserHavePermissions(). This method isn't available from the Client Object Model but you can easily create your own this way:

You can use a similar technique with the Silverlight Client OM but you'll be forced to check asynchroneously!

Happy coding!

class Program
{
static ClientContext Ctx = null;

SharePoint 2010 Client Object Model, synchroneous and asynchroneous behaviors

Hi,

I've seen and I got a lot of questions regarding the client object model and its two execution methods which are:

- ExecuteQuery() => synchroneous
- ExecuteQueryAsync(callback success,callback failure) => asynchroneous

As a quick reminder, if you execute the following code:

The code waits until SharePoint sends a response back. This can be useful if you want to make your code conditional upon SharePoint's answer.

While, here:

PowerShell, SharePoint 64 bits and OS redirection

Hi,

As many of you might know already, when you run PowerShell in 32 bits mode against a SharePoint 64 bits, you'll get unexpected troubles when dealing with some assemblies. For instance, SPFarm.Local is always null...

What I presented at the BIWUG

Warning: I've just (on Sun. may 16) re-amended the code to be compatible with the RTM.
Today, after a trafic jam session (thanks Vilvoorde...) because of which I got late, I presented a session on how WCF is integrated into SharePoint 2010 beta2 (I've not tested yet on the RTM bits) and more particularly how you can benefit from the RESTFUL services and more particularly from ListData.svc.